The best PHP lib/class to generate RSS/Atom [closed] The best PHP lib/class to generate RSS/Atom [closed] php php

The best PHP lib/class to generate RSS/Atom [closed]


The PHP Universal Feed Generator seems to be exactly what you're after - it has a simple, OO-based way of declaring a new feed and outputting it to your desired specification.

It also has built-in date format conversions as one of it's features.

Features:

  • Generates RSS 1.0, RSS 2.0 and ATOM 1.0 feeds
  • All feeds are are validated by feed validator.
  • Implements appropriate namespaces for different versions.
  • Automatically converts date formats.
  • Generates UUID for ATOM feeds.
  • Handles CDATA encoding for required tags.

Supported versions:

  • RSS 1.0 (which officially obsoleted RSS 0.90)
  • RSS 2.0 (which officially obsoleted RSS 0.91, 0.92, 0.93 and 0.94)
  • ATOM 1.0


Do you really need a library? Choose format and simply follow its specification to output valid XML.

Here is some tutorial to get started.


Hmmm, IMO, unless you want enclosures, both of these formats are easy enough to craft without any classes. E.g. for the RSS feeds of a website that I administrate, I simply wrote a small Smarty template, and it works pretty smoothly.