Advantages of RSS
1. You can selectively browse the news you are interested in and related to your work.
2. You can separate the unwanted information (such as selling information and spam.
3. you can create your own news channels and publish them to the Internet.
What is RSS?
RSS refers to Really Simple Syndication (truly simple combination)
RSS enables you to aggregate (Syndicate) website content
RSS defines a very simple way to share and view titles and content
RSS files can be automatically updated
RSS allows personalization of views for different websites
RSS is written in XML
RSS is a way to use XML to distribute network content on a website to many other websites.
RSS enables us to quickly browse news and updates.
Why RSS?
RSS is designed to display selected data.
If you do not have RSS, you have to check new content on your website every day. This is too time-consuming for many users. Through RSS feed (RSS is usually called news feed or RSS feed ), users can use RSS aggregators to check your website updates more quickly (RSS aggregators are websites or software used to aggregate and classify RSS feeds ).
Because RSS data is small and can be quickly loaded, it can be easily used by services similar to mobile phones or PDAs.
Websites with similar content (Web-rings) can easily share content on their websites to make these websites better and more valuable.
The future of RSS
RSS is everywhere!
Thousands of websites are using RSS, and more people recognize its usefulness every day.
Through RSS, information on the internet is easier to find, and website developers can easily spread their content to specific audiences.
After learning so much about RSS, let's try RSS!
Add RSS reading for your website
Save the following file as RSS. asp and place it in the root directory of the website. Modify the parameters.
Program Code
Copy code The Code is as follows: <! -- # Include file = "conn. asp" -->
<%
Sxmlclear = "<? XML version = '1. 0' encoding = 'gb2312 '?> "
Response. charset = "gb2312" 'dataset Encoding
Response. contenttype = "text/XML" 'data stream format definition
%>
<% = Sxmlclear %>
& Lt; RSS version = "2.0" & gt;
<Channel>
<Title> <! [CDATA [folks 'blog]> </title>
<Link> http://xxrblog.cn/</link>
<Description> <! [CDATA [website subtitle or website Introduction]> </description>
<Language> ZH-CN </language>
<Copyright>
<! [CDATA [copyright 2005 pblog2 v2.4]>
</Copyright>
<Webmaster>
<! [CDATA [24525533@163.com (Li Yongliang)]>
</Webmaster>
<Generator> pblog2 v2.5 </generator>
<Image>
<Title> country folks 'blog xxrblog.cn </title>
<URL> http://www.xxrblog.cn/images/logos.gif </URL>
<Link> http://www.xxrblog.cn/</link>
<Description> country folks 'blog xxrblog.cn </description>
</Image>
<%
Set rs = server. Createobject ("ADODB. recordset ")
SQL = "select top 10 * from news order by ID DESC"
Rs. Open SQL, Conn, 3, 3
Do while not Rs. EOF
Content = RS ("content ")
If Len (contact)> 150 then
Content = left (content, 147 )&"..."
End if
%>
<Item>
<Title> <% = RS ("title") %> </title>
<Description> <! [CDATA [<% = content %>]> </description>
<Link> http://xxrblog.cn/article.asp? Id = <% = RS ("ID") %> </link>
<Author> author </author>
<Pubdate> <% = RS ("time") %> </pubdate>
</Item>
<%
Rs. movenext ()
Loop
Rs. Close ()
Set rs = nothing
Conn. Close
%>
</Channel>
</RSS>
The above content has been tested and can be used.