How to build an RSS feed
Computerworld -
Excerpted from Apache, MySQL, and PHP Weekend Crash Course, with permission of Wiley Publishing Inc., all rights reserved.
RSS feeds are the current rage in Web site contentmany sites use this mechanism to syndicate their content. This session finishes the coverage of the publishing system by showing you how to utilize RSS feeds to syndicate your content.
What Are RSS Feeds?
Netscape introduced RSS in 1999 as a concept to syndicate content. At that time, RSS stood for Rich Site Summary. However, Netscape abandoned the concept in 2001 and UserLand Software began pioneering a similar technology as Really Simple Syndication. Still others refer to the RSS concept as RDF Site Summary.
In any case, RSS exists as a simple way to syndicate content.
Note: UserLand Software maintains quite a bit of documentation on RSS at the Web site: http://backend.userland.com/rss.
Syndication is a means of distributing content with the intent of allowing others to publish it. Typically, syndication applies to newspaper columns, comics, and other works of artand generally one derives a fee for each use.
In this case, syndication means an easy method for others to preview your content and optionally republish it. Sites such as slashdot.org, cnet.com, and others use RSS feeds to syndicate their content, as do many Weblog (blog) authors.
RSS Syntax
The syntax for RSS feeds varies considerably depending on the version of RSS that you adhere to. However, the feed is usually published as an XML file with a strict syntax. For example, a typical RSS feed file might resemble the following:
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>title_of_site</title>
<description>description_of_site</description>
<link>http://link.to.site</link>
<item>
<title>title_of_article</title>
<description>short_desc_of_article ...</description>
<pubDate>pubdate_in_ RFC 822_format</pubDate>
<link>link_to_article</link>
</item>
<item>
...
</item>
</channel>
</rss>
In XML format, the file's headers spell out its content and which version of RSS is being used. The beginning of the <channel> section provides details about the main site, while each <item> section provides details about a particular article. Each feed can have up to 15 <item>s and is generally arranged with the newest article first, the oldest article last. As articles are added to the feed, the older articles are moved off the feed.
Publishing the Feed
The XML file is made accessible via HTTP, and special applications can access the feeds and notify users when the feed is updated. For example, the open source project BottomFeeder can monitor several feeds and even seek out new feeds. Figure 30-1 shows an example of BottomFeeder in action.
Development
Additional Resources



Learn the important issues you must consider before starting your next mobility initiative. Get your mobility white paper from IDC now, compliments of Sybase.
White Papers & Webcasts
Extend, Replace, or Convert; which is the best way forward for COBOL Applications?
Download this white paper, free, compliments of Micro Focus!
Forrester Consulting - Optimizing Users and Applications in a Mobile World
Learn how to successfully deploy a WAN optimization solution that is specifically tuned for a mobile environment!
Effectively Implementing Datacenter Automation
Effectively select and deploy the best datacenter automation solution today!
Faster, Cheaper and Easier to Maintain
Can you afford not to upgrade your servers to today's advanced, energy-efficient technologies?
Aligning IT to Business: The Rising Importance of Application Delivery Networks
Application Delivery Networking (ADN) will play a vital role in helping enterprises incorporate strategic technologies to achieve business initiatives.
The State of PCI DSS Compliance at Organizations Today
Download this resource today!
IDC Research Report: The Business Value of Consolidating on Energy-Efficient Servers
Download this Resource Now!
Mitigate Risk, Lower Costs and Improve Network Efficiency
Create a stable IP network that not only meets today's challenges, but is flexible enough to also meet future demands.
