ASP生成RSS

<!--
= * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = * 
*    作 者:  我本有心
=    QQ:     381584252
*     E-Mail: hztgcl1986@163.com
=     转载请注明出处及作者!
*     版权所有,侵权必究!!!
=
*    http://www.8848so.com,人物搜索,8848So    
= * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = * = = * 
-->
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#Include Virtual="Inc/Conn.asp"-->
<%
Response.Charset 
= "gb2312"
Response.ContentType
="text/xml" 

Dim sql,manid

manid 
= Trim(Request.QueryString("manid"))
If IsNumeric(manid) Then
    sql 
= "Select Top 10 ID,Title,Content,Link,NewsDT,RealName,AddRealName From [V-UserNews] Where DataID="&manid&" Order By ID Desc"
Else
    sql 
= "Select Top 10 ID,Title,Content,Link,NewsDT,RealName,AddRealName From [V-UserNews] Order By ID Desc"
End If

Set rs = cn.Execute(sql)

Response.Write(
"<?xml version=""1.0"" encoding=""gb2312"" ?>")
Response.Write(
"<rss version=""2.0"">")
Response.Write(
"<channel>")
Response.Write(
"<title>8848So.com 人物新闻</title>")
Response.Write(
"<link>http://www.8848so.com</link>")
Response.Write(
"<description>8848so.com 百科存储</description>")
Response.Write(
"<category>8848so</category>")
Response.Write(
"<language>zh-cn</language>")
Response.Write(
"<docs>http://www.8848so.com/RSS/RSS.asp</docs>")
Response.Write(
"<generator>www.8848so.com</generator>")
Response.Write(
"<webMaster>hztgcl1986@163.com</webMaster>")
Response.Write(
"<managingEditor>hztgcl1986@163.com</managingEditor>")
Response.Write(
"<pubDate>"&Now()&"</pubDate>")
Response.Write(
"<lastBuildDate>"&Now()&"</lastBuildDate>")
Response.Write(
"<ttl>30</ttl> ")
Response.Write(
"<copyright>Copyright 2007,8848So.</copyright>")

Do While (rs.Eof = False)
    
    Response.Write(
"<item>")
    Response.Write(
"<guid>"&rs("ID")&"</guid>")        
    Response.Write(
"<title>"&rs("Title")&"</title>")
    Response.Write(
"<link>"&rs("Link")&"</link>")
    Response.Write(
"<description><![CDATA["&rs("Content")&"]]></description>")
    Response.Write(
"<author>"&rs("AddRealName")&"</author>")
    Response.Write(
"<source>8848So</source>")
    Response.Write(
"<category>8848So.com 人物新闻</category>")
    Response.Write(
"<pubDate>"&rs("NewsDT")&"</pubDate>")    
    Response.Write(
"<comments>8848So.com 人物新闻</comments>")    
    Response.Write(
"</item>")
    
    rs.MoveNext()
Loop

Response.Write(
"</channel>")
Response.Write(
"</rss>")

Call CDB()
%
>
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值