验证RSS源

<% rssurl=LCase(trim(request.form("Rssurl"))) dim xmlDoc dim root dim number if rssurl="" or left(rssurl,7)<>"http://" or instr(rssurl,".")<2 then response.write "Rss地址非法或不存在!" response.end end if Set http=Server.CreateObject("Microsoft.XMLHTTP") http.Open "GET",rssurl,False http.send if http.Status<>200 then response.write "Rss地址非法或不存在!!" else Set xmlDoc=Server.CreateObject("Microsoft.XMLDOM") xmlDoc.Async=False xmlDoc.ValidateOnParse=False xmlDoc.Load(http.ResponseXML) set root=xmlDoc.documentElement number=root.selectNodes("//channel/item").length-1 for i=0 to number response.write ""&root.selectNodes("//channel/item/title")(i).text&"
" response.write "----------------------------------
" next end if %>