How to include the rss file to our website [closed]

Solution 1:

RSS Basics

RSS is a format where plain-text items are marked up in XML. It is very similar in concept to a web page. And just like a web page is parsed by a browser, RSS consists of an XML document which is downloaded and parsed by an RSS reader.

So, to create an RSS "feed", all you need to do is create a document with items marked up with the correct tags. The Wikipedia entry for RSS has an example which gives all the basic tags you need to have in order to create a fully functional "feed" by hand.

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">

  <channel>
    <title>RSS Feed Title</title>
    <description>This is an example of an RSS feed description</description>
    <link>http://www.example.com/news.xml</link>
    <lastBuildDate>Mon, 06 Sep 2010 00:01:00 +0000 </lastBuildDate>
    <pubDate>Sun, 06 Sep 2009 16:20:00 +0000</pubDate>
    <ttl>1800</ttl>

    <item>
       <title>Example New Item Entry 1</title>
       <description>Here is some text containing an interesting description of your article or link.  
       </description>
       <link>http://www.example.com/blog/post/5</link>
       <pubDate>Sun, 06 Sep 2010 16:31:00 +0000</pubDate>
    </item>
    <item>
       <title>Example New Item Entry 2</title>
       <description>Here is some text containing an interesting description of your article or link.  
       </description>
       <link>http://www.example.com/blog/post/7</link>
       <pubDate>Sun, 06 Sep 2010 16:32:00 +0000</pubDate>
    </item>


  </channel>

The first block is the name of your feed, the link to the XML document (which will be updated over time) and three optional tags.

The second and third block are the actual news items, with relevant title description and links, as well as a publication date tag which many readers will use to display when the article was published.

All you need to do is save this format to a document (.html or .xml) and put it on a live URL for your website (the one you listed in the link of the first block). Then direct your visitors to that URL (e.g. with an RSS button). They can either manually put the feed into their reading software or many browsers automate the process by allowing the user to select a reader the browser is aware of automatically.

In order to "update" the feed, you just change the relevant item block (add/delete) and optional entries under the first block. You can have as many items as you want. The reading software is what takes care of determining what to show the user (e.g. if it detects the same news items, how it displays the information you give it, etc.).

Automation

Most people aren't interested in creating RSS documents by hand. In that case, you use software to help create the documents for you. These documents can then be uploaded to a live URL where visitors can download them with their reading software.

There are some dedicated standalone RSS document makers which are "fill in the blank" (e.g. they give you a window, you fill in the entries and then save the document). More popular are scripts to handle this e.g. Wordpress plugins, which collect and publish information automatically. But regardless, they publish an RSS XML document to a live URL on the server which visitors download. It is all the same mechanism.