www.gusucode.com > 山寨版广告信息招贴网源码程序 > 山寨版广告信息招贴网源码程序/ewuyi/dir_发布/rss.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!--#include file="conn.asp"--> <!--#include file="function.asp"--> <% Response.Buffer=True on error resume next Dim sSQL, rs, sCrLf, sXmlClear, sRssHead, sRssEnd sCrLf = chr(13) & chr(10) sXmlClear = "<?xml version='1.0' encoding='gb2312'?>" & sCrLf sRssHead = "<rss version='2.0'>" & sCrLf sRssHead = sRssHead & "<channel>" & sCrLf sRssHead = sRssHead & "<title>"&sitetitle&"</title>" & sCrLf sRssHead = sRssHead & "<image>" & sCrLf sRssHead = sRssHead & "<title>"&sitetitle&"</title>" & sCrLf sRssHead = sRssHead & "<link>"&siteurl&"</link>" & sCrLf sRssHead = sRssHead & "<url>"&siteLogo&"</url>" & sCrLf sRssHead = sRssHead & "</image>" & sCrLf sRssHead = sRssHead & "<description>"&sitemeta&"</description>" & sCrLf sRssHead = sRssHead & "<link>"&siteurl&"</link>" & sCrLf sRssHead = sRssHead & "<language>zh-cn</language>" & sCrLf sRssHead = sRssHead & "<docs>"&ewuyi_title&"</docs>" & sCrLf sRssHead = sRssHead & "<generator>173158.net</generator>" & sCrLf sRssEnd = "</channel></rss>" Response.CharSet="gb2312" Response.ContentType="text/xml" Response.write sXmlClear Response.write sRssHead set rs=server.createobject("adodb.recordset") sql="select top 25 * from [ewuyi_info] order by adid desc" rs.open sql,conn,1,1 do while not rs.eof response.write "<item>"&sCrLf response.write "<title><![CDATA["&rs("title")&"]]></title>"&sCrLf response.write "<link>"&"http://aiyaha.cn/info/info.asp?id="&rs("adid")&"</link>"&sCrLf response.write "<author>"&rs("user")&"</author>"&sCrLf response.write "<pubDate>"&rs("time")&"</pubDate>"&sCrLf response.write "<description><![CDATA["&ReHTMLEncode(rs("text"))&"]]></description>"&sCrLf response.write "</item>"&sCrLf&sCrLf rs.movenext loop rs.close set rs=nothing conn.close set conn=nothing Response.write sRssEnd %>