public function executeLastDelicious(sfWebRequest $request) { //TODO: Find an another solution to use external lib require_once dirname(__FILE__) . '/../../../../../lib/vendor/delicious/library/php-delicious.inc.php'; $oPhpDelicious = new PhpDelicious('zadkiel87', 'leobanjo1'); $this->recentPosts = $oPhpDelicious->GetRecentPosts(); var_dump($this->recentPosts); echo $oPhpDelicious->LastErrorString(); }
public function SauveBookmarkNetwork($uti, $pwd) { $oDlcs = new PhpDelicious($uti, $pwd); $network = simplexml_load_string($oDlcs->GetNetworkMembers($uti)); $oDlcs->GetUserTags($uti); //récupère les tags du network foreach ($network->channel->item as $NetUti) { $this->SauveBookmark($NetUti->title, $oDlcs); } }
<?php require 'php-delicious.inc.php'; define('DELICIOUS_USER', 'tckb'); define('DELICIOUS_PASS', 'CoreJava'); $oDelicious = new PhpDelicious(DELICIOUS_USER, DELICIOUS_PASS); $sTag = 'yahoo'; // if ($aPosts = $oDelicious->GetAllPosts()) { // foreach ($aPosts as $aPost) { // echo '<a href="'.$aPost['url'].'">'.$aPost['desc'].'</a>'; // echo $aPost['notes']; // echo $aPost['updated']; // } // } else { // echo $oDelicious->LastErrorString(); // } // if ($aPosts = $oDelicious->GetPosts($sTag)) { // foreach ($aPosts as $aPost) { // echo '<a href="'.$aPost['url'].'">'.$aPost['desc'].'</a>'; // echo $aPost['notes']; // echo $aPost['updated']; // } // } else { // echo $oDelicious->LastErrorString(); // } // $sTag = 'twitter', // filter by tag // $iCount = 15 // number of posts to retrieve, min 15, max 100 // if ($aPosts = $oDelicious->GetRecentPosts($sTag,$iCount)) { // foreach ($aPosts as $aPost) { // echo '<a href="'.$aPost['url'].'">'.$aPost['desc'].'</a>'; // echo $aPost['notes'];
<?php require '../../php-delicious.inc.php'; define('DELICIOUS_USER', 'YOUR_USER'); define('DELICIOUS_PASS', 'YOUR_PASS'); $oDelicious = new PhpDelicious(DELICIOUS_USER, DELICIOUS_PASS); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Simple Table of All Posts</title> <style type="text/css"> body { font-family: Arial, sans-serif; } h1 { font-size: 121%; } table { font-size: 92%; } th { background: #ccc; padding: 7px; text-align: left; } td { border-bottom: 1px solid #ccc; padding: 7px; } </style> </head> <body> <h1>Simple Table of All Posts</h1> <?php if ($aPosts = $oDelicious->GetAllPosts()) { ?> <p><?php echo count($aPosts); ?> posts in this account. Results cached for 10 seconds (by default).</p>
/** * Remove the technoratitags rows for the specified post, as well as from del.icio.us */ function event_PostDeleteItem($data) { $itemid = $data['itemid']; sql_query('DELETE FROM ' . $this->tablename . ' WHERE itemid = ' . $itemid); if ($this->getOption('DelIcioUs') == "yes") { // get user/password $user = $this->getMemberOption($this->delaid, 'DeliciousUser'); $password = $this->getMemberOption($this->delaid, 'DeliciousPassword'); if ($user != '' && $password != '') { $oPhpDelicious = new PhpDelicious($user, $password); $oPhpDelicious->DeletePost($this->delurl); ACTIONLOG::add(INFO, 'delurl: ' . $this->delurl); } } }