homepage Welcome to WebmasterWorld Guest from 54.198.25.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
Forum Library, Charter, Moderators: bill & werty

RSS, ATOM, and Related Technologies Forum

    
Reading RSS from PHP pages
Jakotsu

5+ Year Member



 
Msg#: 3219536 posted 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.

 

bill

WebmasterWorld Administrator bill us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 3219536 posted 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.

Jakotsu

5+ Year Member



 
Msg#: 3219536 posted 12:43 am on Jan 16, 2007 (gmt 0)

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

Jakotsu

5+ Year Member



 
Msg#: 3219536 posted 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:

<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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved