智睿软件_技术交流论坛综合站长Web程序开发 → asp防恶意刷新代码


  共有23114人关注过本帖树形打印

主题:asp防恶意刷新代码

帅哥哟,离线,有人找我吗?
zhirui
  1楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:520 积分:8740 威望:0 精华:5 注册:2009-07-07
asp防恶意刷新代码  发帖心情 Post By:2009-10-15 07:09:41

法一:

Dim URL
If DateDiff("s",Request.Cookies("oesun")("vitistime"),Now())<2 Then
URL=Request.ServerVariables("Http_REFERER")
Response.Write("<meta http-equiv=""refresh"" content=""2;URL="&URL&""">")
Response.Write("防刷新,两秒后自动跳转...")
Response.End
End IF
Response.Cookies("oesun")("vitistime")=Now()
法二:

If Request.Cookies("terry.jsjt")("norefresh")<>"" Then
If DateDiff("s",Request.Cookies("terry.jsjt")("norefresh"),Now())<5 Then
If Request.ServerVariables("QUERY_STRING")="" Then
Response.Write("<meta http-equiv=""refresh"" content=""3;URL="&Request.ServerVariables("URL")&""">")
Else
Response.Write("<meta http-equiv=""refresh"" content=""3;URL="&Request.ServerVariables("URL")&"?"&Request.ServerVariables("QUERY_STRING")&""">")
End If
Response.Write("防刷新,三秒后自动跳转...")
Response.End
End IF
End if
Response.Cookies("terry.jsjt")("norefresh")=Now()

中小学校网站管理系统,中小学校的宣传伙伴 支持(0中立(0反对(0回到顶部
帅哥哟,离线,有人找我吗?
zhirui
  2楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:520 积分:8740 威望:0 精华:5 注册:2009-07-07
  发帖心情 Post By:2009-07-13 22:20:21

<% Dim SplitReflashPage Dim DoReflashPage dim shuaxin_time DoReflashPage=true shuaxin_time=10 ReflashTime=Now() if (not isnull(session("ReflashTime"))) and cint(shuaxin_time)>0 and DoReflashPage then if DateDiff("s",session("ReflashTime"),Now())"&shuaxin_time&"秒内连续刷新本页面
正在打开页面,请稍候……" response.end else session("ReflashTime")=Now() end if elseif isnull(session("ReflashTime")) and cint(shuaxin_time)>0 and DoReflashPage then Session("ReflashTime")=Now() end if randomize timer regjm=int(rnd*8998)+1000 %><%
Dim SplitReflashPage
Dim DoReflashPage
dim shuaxin_time
DoReflashPage=true
shuaxin_time=10
ReflashTime=Now()
if (not isnull(session("ReflashTime"))) and cint(shuaxin_time)>0 and DoReflashPage then
if DateDiff("s",session("ReflashTime"),Now())<cint(shuaxin_time) then
response.write "<META http-equiv=Content-Type content=text/html; charset=gb2312><meta HTTP-EQUIV=REFRESH CONTENT=3>本页面起用了防刷新机制,请不要在<b><font color=ff0000>"&shuaxin_time&"</font></b>秒内连续刷新本页面<BR>正在打开页面,请稍候……"
response.end
else
session("ReflashTime")=Now()
end if
elseif isnull(session("ReflashTime")) and cint(shuaxin_time)>0 and DoReflashPage then
Session("ReflashTime")=Now()
end if
randomize timer
regjm=int(rnd*8998)+1000
%>

国际域名60元,空间八折优惠,企业的顶级合作伙伴 支持(0中立(0反对(0回到顶部
帅哥哟,离线,有人找我吗?
zhirui
  3楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:520 积分:8740 威望:0 精华:5 注册:2009-07-07
  发帖心情 Post By:2009-07-13 22:20:52

以下内容含脚本,或可能导致页面不正常的代码
说明:上面显示的是代码内容。您可以先检查过代码没问题,或修改之后再运行.

企业开源网站管理系统,中小型企业的成长伙伴 支持(0中立(0反对(0回到顶部