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.
  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
IBM eBook: Planning a Service Oriented Architecture
IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
Intel Go Parallel Article: Getting Started with TBB on Windows
Microsoft Article: 7.0, Microsoft's Lucky Version?
Avaya Article: How to Feed Data into the Avaya Event Processor
IBM Article: Developing a Software Policy for Your Organization
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Intel Go Parallel Article: Intel Threading Tools and OpenMP
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
HP Video: StorageWorks EVA4400 and Oracle
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
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
IBM Article: Enterprise Search--Do You Know What's Out There?
HP Demo: StorageWorks EVA4400
Microsoft Article: The Progress and Promise of Deep Zoom
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES