Ads by TechWords

See your link here
Receive the latest technology news and information.
Application/Web Development
Computerworld Daily News (First Look and Wrap-Up)
Computerworld Blogs Newsletter
The Weekly Top 10
Cloud Computing
View all newsletters




Privacy Policy
 

How to build an RSS feed

October 31, 2003 12:00 PM ET

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 content—many 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 art—and 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.



Jump to comments

Development

Additional Resources

WHITE PAPER
Approximately 60 percent of data migration projects overrun time or budget, while some fail completely. Download this white paper, "Enhancing Your Chance for Successful Data Migration," to learn the critical steps you need to take to execute a data migration project with minimum cost and risk to your business.
WHITE PAPER
Read the Gartner research note to learn why the TCO of a server-based computing deployment used to deliver all applications to users is around 50% lower than that of an unmanaged desktop deployment.
WHITE PAPER
Economic downturns have a tendency to accelerate emerging technologies, boost the adoption of effective solutions, and punish solutions that are not cost competitive or that are out of synch with industry trends. This IDC White Paper presents the results of an IDC survey of 330 companies in Western Europe, Asia/Pacific and the Americas that measures the receptiveness to Linux and takes into consideration changing views driven by the disruptive economic environment that businesses face today.