博客学堂
首页>>我的博客>>zblog>> ZBLOG 修改catalog.asp防恶意刷新方法

ZBLOG 修改catalog.asp防恶意刷新方法

来源:Wenrow_Blog  | 添加时间:2008-6-19 23:30:16 |   | 我要投稿 | 提问

下面是ZBLOG 修改catalog.asp防恶意刷新方法

打开catalog.asp然后找到该段

If ArtList.ExportByMixed(Request.QueryString("page"),Request.QueryString("cate"),Request.QueryString("auth"),Request.QueryString("date"),Request.QueryString("tags"),ZC_DISPLAY_MODE_ALL) Then
  ArtList.Build
  Response.Write ArtList.html
End If

然后在其下面添加这一段就可以了

Dim ClientIP

ClientIP=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ClientIP="" Or Isnull(ClientIP) Then ClientIP=Request.ServerVariables("REMOTE_ADDR")

If Session("ClientIP")=ClientIP And DateDiff("s",Session("ClientTime"),Now())<10 Then
  response.write "请不要持续刷新本页面"
  response.end
End If

Session("ClientIP")=ClientIP
Session("ClientTime")=Now()
收藏和分享:
评论加载中…
网站地图 - 关于我们 - 版权声明 - 广告服务 - 联系我们 - 诚聘英才 - 帮助中心
Copyright © 2007-2008 www.blog286.com all Right Reserved
博客学堂 版权所有