asp下的一个检测链接是否正常的函数
2008-07-15 19:26
866 查看
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="//www.jb51.net"
if urlChk(sUrl) then
response.write(sUrl&"(可以正常访问)")
else
response.write(sUrl&"(访问不了)")
end if
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="//www.jb51.net"
if urlChk(sUrl) then
response.write(sUrl&"(可以正常访问)")
else
response.write(sUrl&"(访问不了)")
end if
相关文章推荐
- asp下的一个检测链接是否正常的函数
- 检测 一个网站URL是否可以正常访问
- asp.net 验证字符串是否为纯数字检测函数
- 检测一个函数是否是JavaScript原生函数的小技巧
- asp检测是否为中文字符函数
- 四脚猫php视频下载 检测一个网页上的链接是否都可访问(练一练)
- 检测是否还有黑客代码的asp.net函数
- php中检测变量是否是一个对象的is_object函数介绍及用法举例
- PHP - Manual手册 - 函数参考 - Filesystem 文件系统函数 - is_file判断给定文件名是否为一个正常的文件
- 写一个函数,检测输入的数字旋转180度后是否相等,比如619旋转后还是619.
- 检测图片链接是否正常
- ASP.NET中如何检测一个图片是否是真实图片 防范病毒上传
- pthread_kill函数检测一个线程是否还活着的程序
- asp 实现检测字符串是否为纯字母和数字组合的函数
- 检测是否还有黑客代码的asp.net函数
- 检测一个函数是否是JavaScript原生函数的小技巧
- asp检测是否为中文字符函数
- 一个检测网页是否有日常链接的python脚本
- 检测一个网段多个主机网络是否正常(使用数组)