Re: at wits end, please help - XML_RSS not working
| From: | Justin Patrin | Date: | Sun, 07 Nov 2004 20:04:31 +0000 |
| Subject: | Re: at wits end, please help - XML_RSS not working | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15375@lists.php.net to get a copy of this message | ||
On Sun, 7 Nov 2004 04:47:57 -0800 (PST), Stowe Spivey
<spiveyspivey@yahoo.com> wrote:
> 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.
>
Did you, perhaps, install a new version fo PHP as well? Maybe you
installed a new version, but didn't restart apache. The reboot would
have kicked it up to the new version. Check your version of PHP and
let us know what it is.
> 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>";
> }
> }
> ?>
>
--
paperCrane --Justin Patrin--