阻止网站内容被人小偷和采集的ASP代码
发布时间:2022-01-08 18:59:16 所属栏目:Asp教程 来源:互联网
导读:% 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 res
<% 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 %> (编辑:应用网_常德站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |