RSS/Atom feed parser


Skip navigation.

Site search

Site navigation

Details and download

RSS/Atom feed parser

Feed URL:

(Warning: any scripts contained in the feed may be run)

Reset page 

Samples of feeds on the Web

Content is provided by, and property of, the respective authors. Click 'Reset' (at the top of the page) to get back to this list again.


This script allows you to display RSS/Atom feeds on your Web site. It is available as a zip archive. It contains all the files required to run this script. You can put this on your own server, and run it from there. This version also allows you to specify an update interval. There are two versions provided, a regular one, and one that uses a specially modified version of my scroller script to automatically scroll through all the newsfeed items. It uses a PHP passthru script or an equivalent ASP script (as described below) to allow you to access feeds from other domains. Please feel free to contribute translations of the passthru script into other programming languages (Perl, JSP, etc.). I will add them to the archive and credit you as the translator.

To download the script(s), see the script license, and check details like browser compatibility, use the links on the navigation panel at the top of this page.

Note that most of you (and that includes you, BBC) are breaking my terms of use by not contacting me before using this script in your dashboard widgets (a type of bundled software). There is nothing to worry about. I will almost certainly give you permission to use it (I would not put it here if I did not want you to use it), but there are some extra details that I must give you before you use this script. Bottom line; contact me, and ask for permission before including this script in any dashboard widgets.

To use this script to serve your choice of feed without the form, see the previous email where I have described how to do this, or the other previous email if you are still struggling.

This uses my XML importing script to import RSS and Atom feed XML files. It then processes the XML file, and displays the information contained within it as formatted HTML.

It works in Internet Explorer 5+ on Windows and Mac, Opera 7+, Mozilla/Netscape 6+, Chrome/Safari 1.2+, Konqueror 3.3+, iCab 3.0.3+, NetFront 3.4+, ICEbrowser. It is capable of parsing RSS 0.91, partial 1.0, and 2.0, as well as Atom 0.3, and 1.0. It can display titles, feed links, images, publishing dates and copyright info, descriptions, summaries, and contents in (X)HTML or text format, or CDATA blocks, as well as related links, via links, normal links, and even enclosures. It also manages to cope with things like comments inside contents, and a number of invalid feed formats found on the Web. It even has basic support for importing OPML files. The downloadable package can also update at defined intervals, and integrate with a news scroller. Pretty impressive for 10 KB of feed parsing and displaying code.

Note, it is not possible to support xml:base reliably due to browser and HTML limitations. Note also that a few RSS 0.91 feeds incorrectly have HTML in their descriptions, causing this script to show the source code instead. You can choose the 'allow HTML in RSS 0.91' option to have the script treat them as HTML, but note that you should only use this option when you actually need it as it will break valid RSS 0.91 feeds. OPML support is experimental, based on the most common formats in use for sharing feed URLs. Since OPML is very badly defined (the specification neglects to actually define how to specify feed URLs and titles, or even that it is a feed - what was this format for again?), there will almost certainly be some formats in use that this script does not cope with. OPML support also includes support for one custom attribute that allows the RSS 0.91 HTML fix to be automatically applied: fix091="yes"

To enable this to work even though the RSS and Atom feeds come from remote sites, it uses a local PHP or ASP script to pass the XML from the feed server to the script. In order to prevent Opera 7.5 (only) from automatically subscribing to these RSS feeds, the PHP/ASP script also changes the <rss> tag to <rssSpoof>, and <feed> tag to <atomSpoof>. In order to make it work in IE Mac, the PHP/ASP script also adds an empty XML stylesheet into the XML file, as well as removing any existing ones. To enable the links to work properly in Safari, the PHP/ASP script changes them to 'fixlink' tags - otherwise Safari 1.2 mistakes them for HTML LINK tags, and ignores their contents. IE 5 Mac (only) cannot display links and images if they are embedded in an XHTML block within an Atom feed - this bug will not be fixed. Note that the PHP/ASP script does not do any of the feed processing, that is all done with JavaScript.

In IE Mac, Opera 7.5- and ICEbrowser, long feeds would normally be truncated, because the iframe technique allows the document to be available to the script before it is completely loaded. To avoid this, the RSS/Atom parser script adds a delay of 5 seconds in browsers that use the iframe, to allow the feed to load completely. The delay option is a feature of the XML importing script. Browsers that do not need to use the iframe (Opera 7.6+, Internet Explorer 5+ on Windows, Mozilla/Netscape 6+, Chrome/Safari 1.2+, Konqueror 3.3+, iCab 3.0.3+, NetFront 3.4+) ignore the delay and display the feed as soon as it is ready.

This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.