home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Resources / Developers / XAMPP 1.5.4 / Windows installer / xampp-win32-1.5.4-installer.exe / xampp / contrib / xmlrss.php < prev   
Encoding:
PHP Script  |  2005-09-04  |  541 b   |  32 lines

  1. <?php
  2.     header("Content-Type: text/html; charset=utf-8;");
  3. ?>
  4. <html>
  5. <head>
  6. <title>PHP und XML_RSS</title>
  7. </head>
  8. <body>
  9. <?php
  10.     include_once("XML/RSS.php");
  11.  
  12.     $rss =& new XML_RSS('http://www.heise.de/newsticker/heise.rdf');
  13.  
  14.     $rss->parse();
  15.  
  16.     $meta=$rss->getChannelInfo();
  17.  
  18.     echo "<h1>{$meta['title']}</h1>";
  19.     echo $meta['description'];
  20.     echo "<br>";
  21.     echo "<a href=\"{$meta['link']}\">mehr...</a>";
  22.     echo "<p>";
  23.  
  24.     foreach ($rss->getItems() as $item) 
  25.     {
  26.         echo "<a href=\"{$item['link']}\">{$item['title']}</a><br>";
  27.     }
  28.  
  29. ?>
  30. </body>
  31. </html>
  32.