SimplePie RSS Aggregation

Monday 21 July 2008

When re-designing our company website I was looking for something to parse and aggregate the RSS feeds for our 2.0 subscriptions (Twitter, del.icio.us etc.)

The code we were using was a nameless script that wouldn’t run on our development server. As the script was over 3 years old, rather than try and debug it I hunted around for a new one. A popular result on Google was MagpieRss. A quick glance looked like it was up to the job but it was another script that seems to not have been updated in about three years.

I then came across SimplePie. SimplePie is an up to date PHP aggregator that is simple to use and does exactly what I want it to do. Whilst they claim to dislike poor documentation, I had to dig around a few of the tutorials before I got the hang of things but once I did it became far more intuitive to use.

Whilst displaying a single feed on your webpage is a doddle, adding multiple feeds to the same page is just a case of defining an array of feeds to scrape from. SimplePie also caches feeds, which is useful when parsing (notoriously unreliable) Twitter feeds. I like!

Post a Comment