It is a very headache to collect website content by thieves, so do you know how to use ASP code to prevent website content from being collected? Below is the ASP code that the editor of Foxin has sorted out for you to prevent the website content from being collected by thieves. Let’s take a look.
The code copy is as follows:Prevent general collection and thief reading, and add it to the top. Similarly, it can be modified into JS scripts.
<%
Dim AppealNum,AppealCount
AppealNum=10 'The same IP limit is 10 times within 60 seconds
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 "Crawling is very tiring, take a rest!"
response.end
End If
%>
At this point, the content that uses ASP code to prevent the website content from being collected is finished. If you have anything to know, please leave me a message. If you think I write well, please follow our Wrong New Technology Channel.