Navigation :

Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links




Site Sponsors :

Bookmark :

Links :

domain names
software directory
finance products

Downloads :

Misc :

Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming

Valid XHTML 1.0 Transitional


Valid CSS!


Reading RSS feeds with PEAR xml_rss package

Reading RSS feeds with PEAR xml_rss package

<?php
ini_set("include_path", '/home/path_to_include_folder/xmlrss/' . PATH_SEPARATOR . ini_get("include_path"));
require_once 'RSS.php';
$rss_feed = 'http://www.php.net/news.rss';
$rss =& new XML_RSS($rss_feed);
$rss->parse();
print "<ul>\n";
foreach($rss->getItems() as $item)
{
echo "<li><a href=\"" . $item['link'] . "\">" . $item['title'] . "</a></li>\n";
}
print "</ul>\n";
?>