Revision r1.11 - 27 Aug 2003 - 02:40 GMT - LesOrchard


It's been done many times before, but I wanted to whip up a quick Perl CGI to render an RSS feed in HTML for use in SSI on my site. This script does that very simply, yet with a small set of configurable options.

Feel free to leave some comments and suggestions over at RssDisplayDiscussion

News & Status

Had missed the email somehow, but just noticed that Klaus Johannes Rusch sent me even more fixes. Thanks!

-- LesOrchard - 07 May 2003

Yay! A bug with charsets I hadn't even known was a problem has been fixed by revisions submitted by Klaus Johannes Rusch. Thanks!

-- LesOrchard - 29 Dec 2002

First working version. ShareAndEnjoy.

-- LesOrchard - 10 Apr 2002



You may either download the script from my site, or use it directly as a service at http://www.decafbad.com/web-services/url-based/rss_display.cgi.

The script takes the following form parameters:

  • src - URL to the RSS feed to render
    • Defaults to "http://www.decafbad.com/blog/index.rss"
  • max_items - Number of items to display
    • Defaults to 6
  • cache_age - Minimum number of seconds the script will wait between refreshing and rerendering the RSS feed.
    • Defaults to 1800
  • item_class - CSS class used for item text
    • Defaults to "rss_item"
  • update_class - CSS class used for update time
    • Defaults to "rss_update"
  • title_class - CSS class used for RSS feed title
    • Defaults to "rss_title"
  • link_class - CSS class used for RSS feed link
    • Defaults to "rss_link"
  • xml_img - Image URL to use for the RSS feed XML link
    • Defaults to "http://www.decafbad.com/images/xml.gif"

The script returns an HTML fragment like so:

Last scanned: Sun Sep 11 22:45:15 2005

Main.RssDisplay moved from Main.RSSDisplay on 18 Apr 2002 - 03:57 by LesOrchard - put it back

When I grow up, I want to be a computer scientist
Rotating header picture Rotating header picture

Advanced Search

Related Entries

(Disabled, for now.)


View items on my Amazon wishlist

Made on a Macintosh Powered by Movable Type <$MTVersion$> Made for Safari Get Firefox You can do better than Microsoft Internet Explorer

Creative Commons License
This work is licensed under a Creative Commons License.