Welcome to WebmasterWorld Guest from 54.198.147.221

Forum Moderators: bill & werty

Message Too Old, No Replies

Reading RSS from PHP pages

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

Junior Member

10+ Year Member

joined:Dec 7, 2004
posts:88
votes: 0


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)

Administrator from JP 

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

joined:Oct 12, 2000
posts:14980
votes: 131


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)

Junior Member

10+ Year Member

joined:Dec 7, 2004
posts:88
votes: 0


Thanks! I got that working very easily, it's really great. Thanks again. :)
2:02 am on Jan 16, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 7, 2004
posts:88
votes: 0


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:

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

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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members