首页  »  网络编程  »  ASP  »  防止网站内容被人小偷和采集的ASP代码

Update time:2006-12-15 23:36:33  By:佚名    Form:未知  Views:  Type:ASP
字体控制:大  中  小     
视觉颜色:杏仁黄 秋叶褐 胭脂红 芥末绿 天蓝 雪青 灰 银河白(默认色)

防止一般的采集以及小偷读取,加在顶部。同理,可以改造成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
%>
最近更新
热门文章