信息发布→ 登录 注册 退出

ASP实现防止网站被采集代码

发布时间:2026-01-11

点击量:
复制代码 代码如下:
<%
Dim AppealNum,AppealCount
AppealNum=10 '同一IP60秒内请求限制10次
AppealCount=Request.Cookies("AppealCount")
If AppealCount="" Then
Response.Cookies("AppealCount")=1
AppealCount=1
Response.Cookies("AppealCount").Expires=DateAdd("s",60,Now())
Else
Response.Cookies("AppealCount")=AppealCount+1
Response.Cookies("AppealCount").Expires=DateAdd("s",60,Now())
End If
If Int(AppealCount)>Int(AppealNum) Then
Response.Write "抓取很累,歇一会儿吧!"
Response.end
End If
%>
标签:# lt  # Expires  # DateAdd  # Cookies  # Response  # gt  # Write  # Int  # Request  # ASP  # Dim  # span  # BR  # AppealNum  # AppealCount  # 会儿  # 很累  # 防采集  
在线客服
服务热线

服务热线

4008888355

微信咨询
二维码
返回顶部
×二维码

截屏,微信识别二维码

打开微信

微信号已复制,请打开微信添加咨询详情!