Asp利用XMLHTTP检测远程文件是否存在
作者:刚子 日期:2009-06-30
程序代码<%
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
%>
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
%>
评论: 0 | 引用: 0 | 查看次数: -
发表评论
上一篇
下一篇

文章来自:
Tags: