时间:2016-02-24 20:56 来源: 我爱IT技术网 作者:佚名
欢迎您访问我爱IT技术网,今天小编为你分享的编程技术是:【马克斯电影站生成Rss Feed的代码】,下面是详细的分享!
马克斯电影站生成Rss Feed的代码
<%
Session.CodePage=65001
Response.Charset="UTF-8"
'========================================================================
'Copyright (c) 2005-2007, 酸溜溜影视([url]www.366mv.cn[/url]) All rights reserved.
'========================================================================
'名称: rss.asp
'描述: 动态生成Rss Feed。
'========================================================================
%>
<!--#include file=inc/conn.asp--><?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<%
title="酸溜溜影视" '改成你自己的名称
response.write" <channel>"&chr(13)
response.write"<atom:link href=http://www.chinaz.com/program/2008/0306/""http://"&maxz_2&"/xml.asp"" rel=""self"" type=""application/rss+xml"" />"&Chr(13)
response.write" <title>最近更新影片 - "&title&"</title>"&chr(13)
response.write" <link>http://"&maxz_2&"</link>"&Chr(13)
response.write" <description>"&title&" - 万部影片在线观看。免费电影,在线电影,TVB,日剧,韩剧,动漫,科幻,恐怖,言情,连续剧,大片,贺岁片……</description>"&Chr(13)
response.write get_left(15,0) '显示前15部影片,按更新日期排序
response.write" </channel>"&chr(13)
Function re(str)
If Not IsNull(str) then
re=Replace(str,"&","&")
re=Replace(re,"<","<")
re=Replace(re,">",">")
re=Replace(re,"'","'")
re=Replace(re,"""",""")
End if
End Function
Function get_left(n,m)
n=CInt(n):m=CInt(m)
If m=1 Then
mm=" order by zt_hits desc" '按点击量排序
Else
mm=" order by zt_date desc" '按更新日期排序
End If
set rs1=conn.execute("select top "&n&" zt_id,zt_name,zt_zy,zt_dy,zt_type,zt_date,zt_hits,zt_content from zt_data"&mm)
get_left_i=0
Do while not rs1.eof
get_left_i=get_left_i+1
get_left=get_left&" <item>"&Chr(13)
get_left=get_left&" <title>"&re(rs1("zt_name"))&"</title>"&Chr(13)
get_left=get_left&" <link>http://"&maxz_2&"/"&get_classenname(rs1("zt_type"))&"/"&rs1("zt_id")&"</link>"&Chr(13)
get_left=get_left&" <description><![CDATA[<p>类别:<a href=http://www.chinaz.com/program/2008/0306/""http://"&maxz_2&"/"&get_classenname(rs1("zt_type"))&""">"&get_classname(rs1("zt_type"))&"</a></p><p>主演:"&rs1("zt_zy")&"</p><p>剧情:"&re(rs1("zt_content"))&"</p>]]></description>"&Chr(13)
get_left=get_left&" <guid>http://"&maxz_2&"/"&get_classenname(rs1("zt_type"))&"/"&rs1("zt_id")&"</guid>"&Chr(13)
get_left=get_left&" <category><![CDATA["&get_classname(rs1("zt_type"))&"]]></category>"&Chr(13)
get_left=get_left&" <pubDate>"&DateToRFC822(rs1("zt_date"))&"</pubDate>"&Chr(13)
get_left=get_left&" </item>"&Chr(13)
If get_left_i>=n Then Exit Do
rs1.movenext
Loop
rs1.close
End Function
Function DateToRFC822(byVal dtaVal)
Dim strCurLocale : strCurLocale=GetLocale()
SetLocale("en-gb")
dtaVal=CDate(dtaVal)
DateToRFC822=WeekdayName(Weekday(dtaVal),True)&", "& _
Right("0"&Day(dtaVal),2)&" "& _
MonthName(Month(dtaVal),True)&" "& _
Year(dtaVal)&" "& _
Right("0"&Hour(dtaVal),2)&":"& _
Right("0"&Minute(dtaVal),2)&":"& _
Right("0"&Second(dtaVal),2)&" "& _
"+0800"
SetLocale(strCurLocale)
End Function
%></rss>
以上所分享的是关于马克斯电影站生成Rss Feed的代码,下面是编辑为你推荐的有价值的用户互动:
相关问题:奇丰涯影视有毒吗
答:奇丰涯采用马克斯系统内核,代码asp。便于百度优化,是建电影站的首眩马克斯程序(...网站地图系统 强大的网站地图可以方便的生成google,百度,rss,有利于搜索引擎的... >>详细
相关问题:
答: >>详细
相关问题:
答: >>详细
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
