advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Download the code for this article
Partners & Affiliates
advertisement
advertisement
Average Rating: 4.4/5 | Rate this item | 8 users have rated this item.
 Print Print
 
Set Up a Simple Syndication Feed Using RSS
You can set up outbound syndication for your Web site and expose your content to the world in one afternoon using an XML technology called RSS. For anyone who ever wanted to increase audience and traffic while maintaining content and presentation control, RSS is the answer. Find out how to do it, step by step.  

advertisement
n RSS XML feed is an extremely simple way to let external sites link to content on your Web site. If you're looking for a fast, painless way to do outbound syndication and find a larger audience for your content, RSS is going to be worth your time.


At its most basic, RSS generates a list of links, generated programmatically, to various resources on your site with a description of the content for each link. This XML feed is just a publicly accessible text file and therefore you can easily create your feed to automatically regenerate periodically. This way, new content updates are added to the list without any human effort. With RSS, your news feed can be as dynamic as you like.

And, because it's in XML, other sites can easily consume and display your content feed automatically, thereby driving traffic back to your site. This is a win-win situation for sites that want to increase their traffic while maintaining control of their content.

In this article, you'll learn what you need to create a feed, see a sample feed structure, walk through the code that creates the XML (in this case we've used ColdFusion). I'll also discuss additional steps to take for validating and implementing syndication for your site.

What You Need
To create the system to generate an RSS feed and make it publicly accessible, you will need three things: a server on the Internet where you can put the feed, a database that has descriptions of your content, and a server-side scripting language with access to your database.

  1. Decide where you will put the file on your Web site. You may want to have multiple feeds in the future, so consider putting it in a directory called "rss." Decide on a filename that you will not change and put it on your Web site in a location that can remain the same for the foreseeable future. Here's an example location and filename:
    
    http://www.myWebSite.com/rss/myWebSite.xml
    
  2. Decide what content you want to put in the feed. Keep in mind that you will need, at a minimum, two pieces of information for each piece of content you want to syndicate: the title of the content and the URL. For example:

    Title: "Choosing the Right Web Services Management Platform"
    Link: http://www.devx.com/content/id/10549

    Optionally, there are additional fields you should include for each piece of content, for example:

    Description: When you deploy any application, you are expected to have a plan for management and maintenance of that codebase—that's part of the job. But developers have been so busy learning Web services that management issues have taken a back seat. Use these requirements as a checklist for investigating products that should underlie your company's vital Web services and facilitate their long-term management.

    Remember that the author field must contain a valid email address to validate as RSS. The PubDate filed must be properly formatted as a datetime field. For example:

    Author: justin.murray@hp.com (Justin Murray)
    PubDate: Tue, 21 Jan 2003 14:20:36 PST

  3. You can use whatever scripting language you like, anything from Perl to ASP. You must be able to do simple string manipulation, pull data from your database, and set the MIME type of the file being served to the browser.
Page 1 of 4


advertisement
  Next Page: A Sample RSS Feed
Page 1: IntroductionPage 3: Creating the File
Page 2: A Sample RSS FeedPage 4: Finishing Touches
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About


JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Win Server ‘08
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES