The Aggregate Feed Generator is a PHP script that will read one or more (existing) RSS/Atom feeds and generate a new feed composed of the entries from the other feeds.
To do this, we used the SimplePie library, which is used by WordPress to deal with feeds, and pulled in all three feeds then generated a new one.
The result is a small (currently, under 200 lines with comments) script that pulls in any number of feeds and generates a feed for them.
Supported input types: any supported by SimplePie
Supported output types: RSS 2.0, Atom
License: zlib/libpng license
- PHP 5 (tested with 5.3.2)
- SimplePie (tested with 1.2)
Place feed.php
and simplepie.inc
into a web-accessible
directory.
Configuration is done directly in feed.php
. All
configuration is in a clearly marked area; modify (or
fill, where applicable) values in the define
calls and
specify your feeds in $feedUrls
.
-
The URLs to the feeds are the path to
feed.php
followed by?type=rss2
or?type=atom
-
To have browsers detect the feeds, place the following (replacing
URL
) into your <head>:<link rel="alternate" type="application/rss+xml" href="
URL
?type=rss2" title="My Blogs (RSS)">
<link rel="alternate" type="application/atom+xml" href="URL
?type=atom" title="My Blogs (Atom)">