强制刷新网页<%
’强制性刷新随机验证码
’让随机验证码每次按ie的后退按钮时,返回登录页面的随即码都自动刷新,
response.expires=-1
response.addheader"pragma","no-cache"
response.addheader"cache-control","no-store"
%>
判断文件地址是否有效<%
’原创作者:小艺 qq:52093 时间:2005.6.30
response.write("<head><style><!--span{ font-size: 9pt }--></style></head>")
on error resume next
dim thisurl,thistext
thisurl=request("thisurl") ’定义文件地址(非html格式文档)!
if thisurl="" then
response.write("<span>请先输入文件地址!</span>")
response.end
end if
function objxmlhttp(xmlurl)
on error resume next
set objxml = createobject("microsoft.xmlhttp")
objxml.open "get",xmlurl,false
objxml.setrequestheader "content-type","application/x-www-form-urlencoded"
objxml.send
objxmlhttp = objxml.responsebody
if err then
err.clear
response.write("<span>建立连接失败,文件不存在或网络有问题!;错误原因:"&err.description&"!</span>")
response.end
end if
end function
function bytes2bstr(vin)
strreturn = ""
for i = 1 to lenb(vin)
thischarcode = ascb(midb(vin,i,1))
if thischarcode < &h80 then
strreturn = strreturn & chr(thischarcode)
else
nextcharcode = ascb(midb(vin,i+1,1))
strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode))
i = i + 1
end if
next
bytes2bstr = strreturn
end function
thisurl2=split(thisurl,",")
for each ii in thisurl2
thistext=bytes2bstr(objxmlhttp(ii))
if instr(thistext,"<html>")<>0 then
response.write("<span>"& ii &" <b>×</b></span><br>")
else
response.write("<span>"& ii &" <b>√</b></span><br>")
end if
next
if err then
err.clear
response.write("<span>碰到意外!;错误原因:"&err.description&"!</span>")
response.end
end if
%>
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器