Asp利用XMLHTTP检测远程文件是否存在

程序代码 程序代码
<%
url="http://www.4000.cc/gamepic/20096262023157828.jpg"
Function chku(murl)
on error resume next
Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
xmlHttp.open "GET",murl,false
xmlHttp.send
    if xmlHttp.Status <> 200 then
        chku=false
    else
        chku=true
    end if
End Function

if chku(url) then
    response.write(url&"(链接正常)")
else
    response.write(url&"(掉链、坏链、死链)")
end if
%>



文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.