The code copy is as follows:
Force refresh of the web page
<%
'Mandatory refresh of random verification code
'Let the random verification code be automatically refreshed every time the IE back button is pressed on the back button of IE.
Response.expires=-1
Response.AddHeader"pragma","no-cache"
Response.AddHeader"cache-control","no-store"
%>
Determine whether the file address is valid
The code copy is as follows:
<%
'Original author: Xiaoyi QQ: 52093 Time: 2005.6.30
Response.Write("<head><style><!--span{font-size:9pt}--></style></head>")
OnErrorResumeNext
Dimthisurl, thistext
thisurl=Request("thisurl")' defines the file address (non-Html format document)!
ifthisurl=""then
Response.Write("<span>Please enter the file address first!</span>")
Response.End
Endif
Functionobjxmlhttp(xmlurl)
OnErrorResumeNext
Setobjxml=CreateObject("Microsoft.XMLHTTP")
objxml.Open"get",xmlurl,false
objxml.setrequestheader"content-type","application/x-www-form-urlencoded"
objxml.send
objxmlhttp=objxml.responsebody
ifErrthen
Err.Clear
Response.Write("<span>The connection failed to establish, the file does not exist or there is a network problem!; Error reason: "&Err.Description&"!
</span>")
Response.End
Endif
EndFunction
Functionbytes2BSTR(vIn)
strReturn=""
Fori=1ToLenB(vIn)
ThisCharCode=AscB(MidB(vIn,i,1))
IfThisCharCode<&H80Then
strReturn=strReturn&Chr(ThisCharCode)
Else
NextCharCode=AscB(MidB(vIn,i+1,1))
strReturn=strReturn&Chr(CLng(ThisCharCode)*&H100+CInt(NextCharCode))
i=i+1
EndIf
Next
bytes2BSTR=strReturn
EndFunction
thisurl2=Split(thisurl,",")
ForEachiiInthisurl2
thistext=bytes2BSTR(objxmlhttp(ii))
ifInStr(thistext,"<html>")<>0then
Response.Write("<span>"&ii&"<b>×</b></span><br>")
Else
Response.Write("<span>"&ii&"<b>√</b></span><br>")
Endif