/ Published in: PHP
URL: http://benramsey.com/archives/generating-opml-from-delicious/
Expand |
Embed | Plain Text
<?php $username = 'your_username'; $password = 'your_password'; $cache_file = '/tmp/blogroll.xml'; // check for updates to del.icio.us account $update = simplexml_load_file("https://{$username}:{$password}@api.del.icio.us/v1/posts/update"); { // del.icio.us has been updated since last cache; recache $data = file_get_contents("https://{$username}:{$password}@api.del.icio.us/v1/posts/all?tag=blogroll"); file_put_contents($cache_file, $data); } // read links from cached del.icio.us data $blogroll = simplexml_load_file($cache_file); foreach ($blogroll->post as $blog) { echo "</a><br />\n"; } ?>
You need to login to post a comment.
