Parse Feeds with simpleXML

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'
));

Download the script.

Leave a Reply