Parse Feeds with simpleXML
August 18th, 2008 in scripts | No Comments
I’ve been trying to figure out a cool way to display feeds, and in that adventure, I’ve come up with a simple feed parser for PHP based on various other articles I read. It gathers as many feeds as you like and returns a single array with the feed items sorted by date. With that script I’ve created a feed cloud which consists of my tweets, delicious bookmarks, and blog posts. I gave each type a different weight.
Here’s the code I used to get the feeds:
$feeds = getFeeds(array( 'blog' => 'http://www.chromasynthetic.com/blog/feed/', 'delicious' => 'http://feeds.delicious.com/v2/rss/chryu', 'twitter' => 'http://twitter.com/statuses/user_timeline/12885402.rss' ));

Hi, I'm Chris, a passionate freelance web developer. My languages of choice are PHP and JavaScript, and that's what you'll mostly find in my blog. You'll also find updates about 