Monthly Archives: August 2011

Tutorial: Create a Custom Atom and RSS Feed using Php

Filed under Php
Tagged as , ,

I found a tutorial explaining how to create custom feeds for your website with Php.  The tutorial walks though the process of building a feed in step by step instructions.  Once created, the feed can be displayed from your website in multiple formats, including Atom 1.0, RSS 2.0 and RSS 1.0.

Tutorial to Create a Custom Atom and RSS Feed using Php

A free class library is utilized to create the feed, which can be up and running on your site in minutes. Links to download the class are also provided as part of the tutorial.

Main Steps:

  • Create a new (empty) feed using the free class
  • Associate information with the feed channel (Optional)
  • Add Items to the feed
  • Output the feed in on of the supported formats

You only need to configure the custom feed once regardless of the output format.  This allows users to select their preferred format which significantly increases compatibility with feed readers.  Formats as old as RSS 0.91 are also supported, although the amount of meta information that can be associated with the feed and specific items is limited.  When you have included information that is not supported by a particular format, it is ignored when producing the XML output to ensure that the feed structure is valid.

Other useful functionality provided by the class includes the ability to customize the supported formats to suit your needs.

Tutorial to Create a Custom Atom and RSS Feed using Php