topical media & game development

talk show tell print

mashup-delicious-06-example6-7-index.php / php



  <?php
  //bring in magpie goodness
  require_once('magpierss/rss_fetch.inc');
  //set cache directory
  define('MAGPIE_CACHE_DIR', 'cache');
  //set our RSS feed url
  url = 'http://del.icio.us/rss/tag/cookbooks';
  //magpie's fetch_rss
  rss = fetch_rss( url );
  //create a list of each item in the RSS feed
  echo "<ul>";
  foreach (rss->items as item) {
      href = item['link'];
      title = item['title'];
      if (isset(item['description']))
          description = item['description'];
      else
          description = '(no description)';
      echo "<li><a href=href>title</a> - description</li>";
  }
  echo "</ul>";
  ?>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.