ที่อยู่ตัวอย่าง:
http://www.18eden.com/rss.asp
เว็บไซต์: http://www.18eden.com/jiankang
โปรแกรมถูกวางไว้ในไดเรกทอรีราก
หรือเปลี่ยนที่อยู่ของไดเรกทอรีอื่น ๆ และตัวคุณเองเพื่ออ่านทรัพยากร 20 ล่าสุด (สามารถแก้ไขได้เพื่ออ่านพารามิเตอร์ GET)
กำหนดที่อยู่เว็บไซต์และพอร์ตโดยอัตโนมัติโดยไม่มีการแทรกแซงด้วยตนเอง
การคัดลอกรหัสมีดังนี้:
<%ตัวเลือก Explicit%>
<!-#includefile = "จัดการ/รวม/config.do"->
-
Dimssql, RS, SCRLF, SXMLCLEAR, SRSshead, SRSSEND, URL
scrlf = chr (13) & chr (10) 'enter+win
ifrequest.serverVariables ("https") = "on"
url = "https: //"
อื่น
url = "http: //"
endif
url = url & request.serverVariables ("server_name") & ":" & request.serverVariables ("server_port")
sxmlClear = "<? xmlVersion = '1.0'Encoding =' GB2312 '?>" & scrlf
'srsshead = "<rdf: rdfxmlns: rdf =' http: //www.w3.org/1999/02/22-rdf-syntax-ns#'xmlns: dc = 'http: //purl.org/dc/elements/ s: sy = 'http: //purl.org/rss/1.0/modules/syndication/'xmlns: admin =' http: //webns.net/mvcb/'xmlns='http: //purl.org/rss/
srsshead = "<rssversion = '2.0'>" & scrlf
srsshead = srsshead & "<channel>" & scrlf
srsshead = srsshead & "<title>" & def_mysitetitle & "</title>" & scrlf
srsshead = srsshead & "<scription>" & def_systitle & "</คำอธิบาย>" & scrlf
srsshead = srsshead & "<link>" & url & "</link>" & scrlf
srsshead = srsshead & "<language> zh-cn </language>" & scrlf
srsshead = srsshead & "<docs> NewsCenter </cocs>" & scrlf
'srsshead = srsshead & "<dc: ผู้สร้าง> Yezhan, [email protected] </dc: ผู้สร้าง>" & scrlf
srsshead = srsshead & "<senerator> rssgenerator </ensomator> <times>" & scrlf
SRSSEND = "</items> </channel> </rss>"
ชุดข้อมูล 'response.charset = "GB2312"' 'ชุดข้อมูล
response.contentType = "text/xml" 'คำจำกัดความรูปแบบการไหลของข้อมูล
Response.ContentType = "Application/XML"
Response.exext = 0
Response.writesxmlClear
Response.writesrsshead
dimconn
setConn = server.createObject ("adodb.connection"))
conn.openconnstr
dimsql