Welcome to WebmasterWorld Guest from

Forum Moderators: bill & werty

Message Too Old, No Replies

Reading RSS from PHP pages



6:22 am on Jan 15, 2007 (gmt 0)

10+ Year Member

Hi, I have a website totally PHP4 and JS capable, and have to read an RSS feed to show certain items from it on my pages. Is there some pre-made PHP script to do so and implement it on my site?

Thanks in advance.


7:10 am on Jan 15, 2007 (gmt 0)

WebmasterWorld Administrator bill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

MagpieRSS is an open source RSS parser that has been mentioned here a number of times. It works in PHP.


12:43 am on Jan 16, 2007 (gmt 0)

10+ Year Member

Thanks! I got that working very easily, it's really great. Thanks again. :)


2:02 am on Jan 16, 2007 (gmt 0)

10+ Year Member

Oops. It works until I try to read an item named <content:encoded> which has some HTML code inside it. I got an undefined index error when reading it with the standard method:

$MyContent = $item['content:encoded'];

this returns an error as "Notice: Undefined index: content:encoded ..."

The item from the RSS is shown this way on IE6:

- <![CDATA[ <table><tr valign="top">some more HTML code here blah blah</tr></table>

Is there some way to read this item with the MagpieRSS? This item is handled differently for some reason, any help on this will be really appreciated.


Featured Threads

Hot Threads This Week

Hot Threads This Month