I was wondering i am really struggling with this. Want i want to do is read a RSS feed and grab all the links and output them as a string. I Am using PHP 4.4.4.
Thanks...
php RSS
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
For parsing XML in PHP 4 your have a choice of DOM XML, which is crap, or SAX, which is crap. You can google for tutorials on either of these (you'll probably be able to find ones specific to RSS in fact), I'd probably go with SAX because at least that isn't a bastardized implementation and the RSS data structure is pretty simple.
PHP 5 has much better implementation of DOM as well as the very popular SimpleXML.
PHP 5 has much better implementation of DOM as well as the very popular SimpleXML.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
You're right: it is a little hefty, includes caching support and a lot of other junk you probably wouldn't use. It's fairly modular though, so you probably won't incur the extra bloat if you don't use it.
realtime158: If you have a very specific application for the RSS parser, you might just write your own as ole suggested.
realtime158: If you have a very specific application for the RSS parser, you might just write your own as ole suggested.