求动网论坛的防刷机制代码

来源:百度知道 编辑:UC知道 时间:2024/05/31 02:44:13
感觉动网的防刷新机制很好,找了好久,也没弄明白是怎么回来
没人知道吗

dim posttime,DoReflashPage,ReflashPage,SplitReflashPage,Y,ScriptNameY
ScriptNameY=lcase(request.ServerVariables("PATH_INFO"))
posttime=2 '防止刷新时间 0为不防止
DoReflashPage=False
ReflashPage="|dddd"
SplitReflashPage=split(ReflashPage,"|")
For Y=0 to ubound(SplitReflashPage)
IF instr(ScriptNameY,SplitReflashPage(Y))>0 Then
DoReflashPage=True
Exit For
End If
Next
If (not isnull(session("ReflashTime"))) And posttime>0 And DoReflashPage Then
If DateDiff("s",session("ReflashTime"),Now())<posttime Then
Response.Write "<META http-equiv=Content-Type content=text/html; charset=gb2312><meta HTTP-EQUIV=REFRESH CONTENT="&posttime&"><br>请不要在"&posttime&"秒内连续刷新本页面<BR>正在打开页面,请稍后……"
Response.End()
Else
session("ReflashTime")=Now()
End If
ElseIf isnull(se