网站防止采集代码
·设为首页
·加入收藏
·网站地图
News推荐内容
Top热门点击
您当前位置: 百度联盟 >> 教程文章 >> 教程系列 >> ASP教程 >> 正文网站防止采集代码
2007-5-17

网站防止采集代码

防止一般的采集以及小偷读取,加在页面顶部。
当然,也可以转换成JS脚本。

<%
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
%>


最新评论   全部评论
暂无评论信息
发表评论   全部评论
请自觉遵守互联网相关的政策法规,禁止发布任何违规和广告内容。 评价: 中立 好评 差评  
用户名: 密码: 验证码: