国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

可以應用到馬克斯電影站生成Rss Feed的代碼

2024-05-04 10:57:31
字體:
來源:轉載
供稿:網友
使用方法:將下面的代碼存為rss.asp(記得以UTF-8格式保存)并上傳到網站根目錄,剩下的工作就是找Rss提交入口去提交你的Feed地址http://你的域名/rss.asp 
演示:http://www.366mv.cn 
代碼如下,請根據注釋修改相應的信息,版權信息還望各位能夠保留 ^_^ 

復制代碼 代碼如下:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> 
<% 
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://"&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://"&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 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 通许县| 高密市| 丹东市| 盐边县| 富顺县| 太白县| 枣庄市| 沁阳市| 谢通门县| 河津市| 满城县| 商洛市| 芷江| 哈密市| 察雅县| 来宾市| 湄潭县| 句容市| 册亨县| 武威市| 沙洋县| 万荣县| 安徽省| 永德县| 交城县| 霞浦县| 惠来县| 潼关县| 梁河县| 凌海市| 铁岭县| 庐江县| 怀远县| 禄劝| 焉耆| 江达县| 闽侯县| 仲巴县| 屯门区| 西乌珠穆沁旗| 洛浦县|