at wits end, please help - XML_RSS not working
| From: | Stowe Spivey | Date: | Sun, 07 Nov 2004 12:47:57 +0000 |
| Subject: | at wits end, please help - XML_RSS not working | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15374@lists.php.net to get a copy of this message | ||
About a week ago, my pages with rss feeds stopped displaying the
feeds.
I assume PEAR is working since I can use DB in another page on the
same server. I can also LYNX to the page I am trying to use as a
feed so the server itself can get to the rss feed.
allow_url_fopen is set to ON.
I have uninstalled and re-installed XML_RSS - same problem still
exists.
The problem is that it does not display the feed items. I have used
the exact code from the manual without success in the manual without
success.
Again, the code below worked fine until a week ago. I rebooted the
server around that time but it worked after that and the other PEAR
packages I am using still work fine.
What do I need to check or do? Many thanks for ANY Help!
Here's the code:
<?php
ini_set("include_path", "/path_to/pear/");
require_once "XML/RSS.php";
$rss =& new XML_RSS("http://pear.php.net/feeds/latest.rss");
$rss->parse();
$i = 0;
foreach ($rss->getItems() as $item) {
$i++;
if ($i < 15) {
echo "<a href=\"" . $item['link'] . "\">" .
$item['title'] .
"</a><br>";
}
}
?>
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com