Chris Nizzardini, Salt Lake City Utah, Web Developer Specializing in LAMP+Ajax Since 2006

My Blog

Here is my awesome blog.

getting rss feeds with php’s simplexml_load_file() function

I’ve been reading this object oriented php book and here’s one of the cool things I’ve learned from it. Using php you can easily get rss feeds and parse the xml files output to your page with the simplexml_load_file() function. There are so many things you can do with this. You can keep your sites content fresh with a news section using this or you could even create a web-based feed manager, like feedme.com or something like that. Click here for the quick, dirty, and inelegant code.

The other thing you can do is set the $feed variable to a post. Then create an array of several different rss feeds, populate that array in a drop down box, and allow the user to select whatever feed. Pretty slick.

Leave a Reply