Aggregate multiple feeds, order by date, with PHP

by oneafrikan on November 30, 2005

Has anyone had any experience / done any experimenting aggregatng mutiple feeds and ordering them by date, using php and without using a database?

I’m playing with MagpieRSS atm, and it’s an awesome tool that does a really good job, and was wondering whether anyone else has done anything similiar with it?
I’ve also started playing with Feeds on Feeds, which is also pretty cool, but it uses a DB so not ideal…

Any thoughts, directions or help would be much apprecited ;-)


Hi Gareth,
I’m using magpie but have only got as far as playiing with it so far. I’m not using its caching though, I’m putting straight back into a DB…

by Peter Nixey on December 1, 2005 at 10:11 am. Reply #

Thanks Peter ;-)

See, the problem I can see with using a DB for the purpose that I have (only need to see current feed, not archived feeds) is that you end up populating a DB unnecessarily. I spose you could go back and delete rows based on a time criteria, but that’s not really solving the problem but just working around it…

by Gareth Knight on December 1, 2005 at 1:21 pm. Reply #

Wikipedia has quite a list of RSS aggregators, here:

by Gareth Knight on December 1, 2005 at 2:42 pm. Reply #

I’m looking to do exactly this, if you find out, please let me know.

by Gesslar on January 26, 2006 at 1:41 am. Reply #

Will do – should be posting something soon on this blog if I get it to work the way I want it to…

by Gareth Knight on January 26, 2006 at 5:32 pm. Reply #


I’ve used magpie to bring feeds to my homepage, but am not having much luck in creating a “master feed” of all my content (which is my next goal).

If you have any luck I’d be thankful to hear about it. Cheers!

by Craig (mars-hill) on April 5, 2007 at 3:55 pm. Reply #

Will do Craig ;-)

by Gareth Knight on April 6, 2007 at 1:40 pm. Reply #

Howto sort by date

1. Get feed into array using magpie
2. write sort compare function. This compares timestamps!
3. use php usort with custom compare function
4. Loop array and display.

Worked for me, but tricky!

by EH on April 23, 2008 at 9:11 am. Reply #

EH could you share your source with us, as I am also looking to do this very thing. If possible, perhaps e-mail me at Thanks

by Anthony on April 29, 2008 at 3:20 pm. Reply #

Leave your comment


Required. Not published.

If you have one.

Protected with IP Blacklist CloudIP Blacklist Cloud