Hi Shanti,

The only way I've found of doing that so far is by parsing the actual /url/
page. I've found you have to be careful not to get throttled though!

My code is below, but if there is an easier way it would be good to know?

PHP:
$del_url = "http://del.icio.us/url?v=1&url=$YOUR_URL";;
// get num posts
if ($handle = @fopen($del_url, "r")) {
    $content = "";
    while (!feof($handle)) {
        $part = fread($handle, 10024);
        $content .= $part;
        //if (eregi("<div class=\"sidebar-break\"></div>", $part)) break;
    }
    fclose($handle);
    $lines = preg_split("/\r?\n|\r/", $content); // turn the content in rows
    $is_title = false;
    foreach ($lines as $val) {
        if (eregi("this url has been saved by (.*) pe", $val, $num)) {
            $popularity = $num[1];
        }
    }
    
}
--
View this message in context: 
http://www.nabble.com/obtaining-aggregate-post-counts-for-URLs-bookmarked-on-del.icio.us-t460815.html#a3863100
Sent from the Delicious (del.icio.us) forum at Nabble.com.

_______________________________________________
discuss mailing list
discuss@del.icio.us
http://lists.del.icio.us/cgi-bin/mailman/listinfo/discuss

Reply via email to