Add the RSS subscription function on your webpage

Source: Internet
Author: User
Tags website server

RSS (also called aggregate content, really simple
Syndication) is a format used to describe and synchronize website content. With its unique features, it is quickly available on major websites and blogs. Although RSS has simple functions, but it can bring a lot of convenience to users. It can subscribe to blogs (you can subscribe to the technical articles you need at work; you can also subscribe to the blogs of authors who share a hobby with you. In short, if you are interested in something, you can order it. You can also subscribe to News (whether it's strange news, celebrity news, or sports news, you can subscribe to what you want to know ), you no longer need a website, a webpage, or a webpage to visit. As long as you subscribe the content you need to an RSS reader, the content will automatically appear in your reader, you do not need to refresh the webpage for an eager message, because once an update is made, the RSS reader will notify you by yourself.


Of course, the emergence of RSS is a win-win situation for website operators and website visitors.
For operators:

First, the delivery information generates advertising revenue. For example, if a user subscribes to golf content using RSS, an advertisement for golf-related products will appear precisely under each piece of information, from Golf clubs to membership cards.
  

Second, create a personal portal to turn all blogs into reporters and editors of this portal, and use traffic to charge advertising fees. Cai stressed that we are not simply using RSS tools, because they are only in the initial stage and cannot sell much money. Instead, we need to gather popularity through tools to form a personal portal.
  

Third, multi-platform unification, is committed to developing and building multi-channel, multi-device integrated information service platform, to provide users with anytime, anywhere, any device, personalized information services. With the help of PCs, mobile phones, PDAs, digital TVs, and other terminals, users can customize the services through "watching the world" and "personal portal" to obtain and manage the latest information on the Internet.


For visitors: they can collect the information they want in a concentrated manner at the first time, and no longer need to visit each section of the website one by one, improving the efficiency of obtaining information.


So how does RSS work? How can we add the RSS subscription function on our website?

To provide RSS, each website server must provide an XML file (this file can be generated by tools, such as myrsscreator and feedfire, and can also be edited manually)

Let's take an example:

  1. <? XML version = "1.0" encoding = "ISO-8859-1"?>
  2. & Lt; RSS version = "2.0" & gt;
  3. <Channel>
  4. <Title> Home page </title>
  5. <Link> http: // www. ****. com </link>
  6. <Description> free web building tutorials </description>
  7. <Item>
  8. <Title> RSS tutorial </title>
  9. <Link> http: // www. ****. com/RSS </link>
  10. <Description> New RSS </description>
  11. </Item>
  12. </Channel>
  13. </RSS>

<Channel> the element can describe RSS
Feed with three required child elements:
* <Title>-
Define the channel title.
* <Link>-
Defines the hyperlink to the channel.
* <Description>-
Describe this channel (for example, a free website construction tutorial)

<Channel> usually contains one or more
<Item> element. Each
<Item> An element can be used to define an article or
"Story ". In addition, there are several optional <channels>
.

After the XML file is generated, we can add the RSS function to our webpage. The steps are as follows:

1. Name your RSS. Note that the file must have a. xml suffix, for example, testrss. xml.
2. Verify your RSS file. (Good validators can be found in the http://www.feedvalidator.org ).
3. Upload the RSS file to the web directory on your Web server.
4. Set this small orange button
Or copy it to your web directory.
5. Place this button on the page you want to provide RSS to the outside world. Add a link to the RSS file to this button. The Code should be similar to this:

  1. <A href = "www. ***. com/RSS/testrss. xml">
  2. </A>

6. Submit your RSS feed to the RSS feed directory. Note! The feed URL is not your page, but your url pointing to your feed
For example, "http: // www. ***. com/RSS/testrss. xml ". Here we provide some free RSS
Aggregation service:
* Syndic8: over 300,000 feeds listed. register your feed
Here.
* Daypop: over 50,000 feeds. register your feed here.
* Newsisfree: over 18,000 feeds. register your feed here.

7. register your feed with an important search engine:
* Yahoo http://publisher.yahoo.com/promote.php
* Google-

Http://www.google.com/intl/zh-cn/webmasters/addfeed.html

* MSN-http://rss.msn.com/publisher.armx

8. Update your feed-now you have obtained RSS feeds from Google, Yahoo, and MSN
Button. Always update your content and keep your RSS feed available for a long time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.