asp检测域名是否可以打开的函数
Function urlChk(sUrl)
on error resume next
Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
xmlHttp.open "GET",sUrl,false
xmlHttp.send
urlChk= false
if xmlHttp.Status = 200 then urlChk= true
set xmlHttp=nothing
End Function
'使用方法
sUrl="http://www.suntw.com"
if urlChk(sUrl) then response.write("正常") else response.write("打不开")
上一篇: linux根目录下各文件夹的作用
下一篇: 家用带宽配合VMware拨号上网
目前这篇文章有175条评论(Rss)