RSS tutorial
RSS tutorial RSS feed for a web site RSS feed tutorial RSS feed sample web syndication.
Getting a feed on to a web site is easy. They call it "to syndicate".
There are at least three systems: RSS, RDF and Atom. One is better than another. As far the feed works we do not care much about their internal beauty.
Basically, we need two things:
- An XML file that contains
<title>and<description>tags. - A link with a cute RSS icon on the web site that points to that XML file.
That XML file must have .xml extension. If the RSS file is echoed with PHP on fly, then it ends with .php naturally. All requests for .xml file are redirected with rewrite engine or .htaccess to .php file.
Link to the XML file
<a href="rss.xml" target="_blank" title=""><img alt="" src="rss.png" /></a>
XML file
A bare minimum of XML code that works and validates by feed validators, sample RSS code:
<?xml version="1.0" encoding="utf-8" ?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>Tuljo.com</title> <description>Web design, web development and SEO services</description> <link>http://www.tuljo.com/</link> <atom:link href="http://www.tuljo.com/rss.xml" rel="self" type="application/rss+xml" /> <item> <title>RSS tutorial</title> <description>This RSS tutorial explains how to create RSS feed for a web site.</description> <link>http://www.tuljo.com/web-development/rss-tutorial/</link> <guid>http://www.tuljo.com/web-development/rss-tutorial/</guid> </item> <item> <title>Another article</title> <description>Another article another article another article.</description> <link>http://www.tuljo.com/web-development/another-article</link> <guid>http://www.tuljo.com/web-development/another-article</guid> </item> </channel> </rss>
You may want to add more tags to the RSS code.
<language>en-gb</language> and <copyright>Copy...</copyright> will go in as children of <channel>.
<pubDate>Sun, 29 Sep 2002 17:24:20 GMT</pubDate> goes between <item> tags.
RSS tutorial by W3schools tells the ropes - RSS Tutorial. W3C presents full RSS 2.0 specification
Test RSS feed
All done, but still browsers do not update from my RSS feed. Panic!
Well, they do in fact. Firefox Live Bookmarks checks every hour for updates. Live Bookmarks works with any web feed in RSS, RDF, or Atom format. IE default setting is to check feeds for new updates once a day. For testing purposes set your IE to refresh every 15 minutes, update your .xml, and check back after a cup of coffee - the list has been updated!
Not clear? Disagree? Contact.
2011.
Web Development - XHTML CSS JavaScript jQuery.