| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|Reading RSS from PHP pages|
| 6:22 am on Jan 15, 2007 (gmt 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)|
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)|
Thanks! I got that working very easily, it's really great. Thanks again. :)
| 2:02 am on Jan 16, 2007 (gmt 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:
- <![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.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved