asp实现rss订阅功能
作者:wang 日期:2009-12-15
<%sub rss()%>
<%
dim action,catalog,sql_other,website_url
website_url="http://www.baidu.com"
action=trim(request("action"))
catalog=trim(request("catalog"))
if trim(catalog)<>"" then
sql_other=sql_other&" and [catalog]='"&catalog&"'"
end if
sXmlClear = ""
Response.CharSet="utf-8" '数据集编码
Response.ContentType="text/xml" '数据流格式定义
%>
<%=sXmlClear%>
]]>
<%=website_url%>
]]>
zh-CN
]]>
]]>
MS ASP
<%=website_title%>
<%=website_url%>images/logos.jpg
<%=website_url%>
<%=website_des%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from news where 1=1 "&sql_other&" order by id desc"
response.Write sql
rs.open sql,conn,3,3
do while not rs.eof
Content=rs("content")
if Len(Content)>150 then
Content=left(Content,147) & "..."
end if
%>
<%=website_url%><%=catalog%>_view_<%=rs("id")%>.html
<%=rs("Title")%>
<%=website_title%>
]]>
<%=rs("datetime")%>
<%=website_url%><%=catalog%>_view_<%=rs("id")%>.html
]]>
<%
rs.movenext()
loop
rs.close()
Set rs = Nothing
conn.close
%>
<%end sub%>
<%
dim action,catalog,sql_other,website_url
website_url="http://www.baidu.com"
action=trim(request("action"))
catalog=trim(request("catalog"))
if trim(catalog)<>"" then
sql_other=sql_other&" and [catalog]='"&catalog&"'"
end if
sXmlClear = ""
Response.CharSet="utf-8" '数据集编码
Response.ContentType="text/xml" '数据流格式定义
%>
<%=sXmlClear%>
<%=website_url%>
<%=website_url%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from news where 1=1 "&sql_other&" order by id desc"
response.Write sql
rs.open sql,conn,3,3
do while not rs.eof
Content=rs("content")
if Len(Content)>150 then
Content=left(Content,147) & "..."
end if
%>
<%=website_url%><%=catalog%>_view_<%=rs("id")%>.html
<%
rs.movenext()
loop
rs.close()
Set rs = Nothing
conn.close
%>
<%end sub%>
上一篇: asp上传excle文件并导入到access数据库
下一篇: asp根据IP地址获取物理位置(gb2312,utf-8)
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
下一篇: asp根据IP地址获取物理位置(gb2312,utf-8)
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 0 | 引用: 0 | 查看次数: 3632
发表评论