Page 1 of 1

PHP RSS Reader

Posted: Wed Feb 27, 2008 4:57 am
by RobbieL
Working a little project, and want to include the ability for users to add RSS feeds to a particular page. I've never used XML with PHP, so had a quick Google to see how things are done. So far I've come across 3 ways of apparently getting it done, and they all look pretty different to one another. Using PHP's built in XML functions, SimpleXML or cURL (with what looks like SimpleXML).

Is there any benefit to using a particular method? I actually went ahead and created what I was needing using PHP's built in XML functions, but having a right bother getting it to only display the last 5 feeds and not the entire feed, so was wondering if the other 2 methods makes things a little less hassle free.

Re: PHP RSS Reader

Posted: Wed Feb 27, 2008 9:37 am
by pickle
Of those three methods, SimpleXML is your best bet. It is quite a bit simpler than the other two methods. If those don't work, maybe look at a third party library such as magpieRSS or SimplePie (my personal favourite).

Re: PHP RSS Reader

Posted: Thu Feb 28, 2008 3:31 am
by RobbieL
Cheers Pickle. Had a quick look at SimpleXML, and you're definitely right, it is a lot simpler to get done. Thanks again. :)

Re: PHP RSS Reader

Posted: Thu Feb 28, 2008 4:38 am
by Chris Corbyn
SimplePie. It's Magpie, but better ;)