tags:

views:

426

answers:

4

Hi All, I'm wishing to aggregate some Blog feeds into an existing PHP-based website. There's tons of free libraries for PHP that consume RSS feeds. But I thought I'd throw out my needs to see if I can get the number to try minimized to one that's popular.

1) I'm wishing to aggregate some top items from up to 3 different RSS feeds into one stream for consumption.

2) In addition, I may want to aggregate stories from the different websites that match a certain "tag".

3) I'd prefer if this ran daily as a chron job and updated some static html include files, as the feed doesn't need to be updated constantly.

4) I'd also like the possibility of the feed writing to a couple different static html includes. So that I can have one Main news section, and then maybe a call-out section on the right that matches a specific tag for the article or something.

So, what's your favorite libraries/code snippets to accomplish some of this.

Thanks, Todd

+1  A: 

Yahoo pipes is an excellent way of aggregating feeds.

There is also functionality to add rules to do operations such as get rid of duplicate entries or filter items matching specific criteria.

For actually parsing the feed, the class library Simple Pie is great.

Jon Winstanley
A: 

You might check out gregarious. It stores into databases which you can then manipulate as you see fit. Plus, you ought to be able to integrate to it directly to speed things up.

Nerdling
+1  A: 

SimplePie has performed extremely well for me in every project I've used it in.

In your case its a good match because it fits 2 of your requirements:

1) You can give it an array of feeds which it will treat as one combined feed

2) It has built-in caching

For pulling only items which match a tag, that depends on the site owner enabling this ability (e.g. flickr and YouTube). Otherwise you'll have to use the normal feed and decide which items to keep on your own.

Regarding updating static html files which match certain categories, that's also something you'll need to code yourself. It shouldn't be difficult, and SimplePie will make parsing the feed quite easy.

qeorge
A: 

Its not quite what you described, but you can do this with MagpieRSS.

Also, and this also isn't quite what you asked for, you may want to check out Planet - it's written in Python.

warren