parsing RSS with PEAR XML_RSS

Source code


<?php include('./.config.php');
require_once 
"XML/RSS.php";
$rss =& new XML_RSS("http://slashdot.org/slashdot.rss");
$rss->parse();
echo 
"<h1>Headlines from <a href=\"http://slashdot.org\">Slashdot</a></h1>\n";
echo 
"<ul>\n";
var_dump($rss->getItems());
//foreach ($rss->getItems() as $item) {
//    echo '<li><a href="'.$item['link'].'">'.$item['title']."</a><br/>".$item['description']."</li>\n";
10 //}
11 
echo "</ul>\n";
12 include(
'./.footer.php')?>

Output


Warning: require_once(XML/RSS.php) [function.require-once]: failed to open stream: No such file or directory in /home/davidmintz/www/davidmintz.org/php_course/examples/10/pear_rss.php5 on line 2

Fatal error: require_once() [function.require]: Failed opening required 'XML/RSS.php' (include_path='/usr/home/dmintz/inc/pear:.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/davidmintz/www/davidmintz.org/php_course/examples/10/pear_rss.php5 on line 2