Example -- Basic examples of Services_Delicious
Basic examples of Services_Delicious
The following examples show how to use some basic features
of Services_Delicious:
Пример 63-1. Fetching your recent posts
require_once 'Services/Delicious.php';
$dlc = &new Services_Delicious($username, $password);
$posts = $dlc->getRecentPosts();
echo '<pre>';
print_r($posts);
echo '</pre>'; |
|
Пример 63-3. Adding a new bookmark
require_once 'Services/Delicious.php';
$dlc = &new Services_Delicious($username, $password);
$result = $dlc->addPost('http://pear.php.net', 'PEAR', 'The PHP Extension and Application Repository', 'php');
if (PEAR::isError($result)) {
die($result->getMessage());
} else {
echo 'Success';
} |
|