Function urlChk(sUrl) on error resume next Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP") xmlHttp.open "GET",sUrl,false xmlHttp.send if xmlHttp.Status <> 200 then urlChk=false else urlChk=true end if End Function
sUrl="http://www.49028c.com" if urlChk(sUrl) then response.write(sUrl&"(可以正常訪(fǎng)問(wèn))") else response.write(sUrl&"(訪(fǎng)問(wèn)不了)") end if