成人黄色在线免费网站,久久99久久久久99精品,一区二区福利在线视频 http://m.createwh.com 傳播先進(jìn)設(shè)計理念 推動原創(chuàng)設(shè)計發(fā)展 Thu, 01 Nov 2007 04:37:00 +0000 zh-Hans hourly 1 https://wordpress.org/?v=6.9.1 網(wǎng)站防采集的幾種方法 http://m.createwh.com/12661.html http://m.createwh.com/12661.html#respond Thu, 01 Nov 2007 04:37:00 +0000

   如今的采集系統(tǒng)是一個比一個NB,站長們辛苦收集制作的網(wǎng)站內(nèi)容總是很快出現(xiàn)在在另一個網(wǎng)站上,一個網(wǎng)站輕易的就被復(fù)制了又復(fù)制。有辦法既不影響搜索引擎的正常收入又能解決網(wǎng)站被采集之苦么?答案是肯定的。

    最常用的防采集方法:

    1.每個文章的命名不要有任何規(guī)律,比如你的文章是<%=id%>.htm的話,請?jiān)谇懊婊蚝竺嫔蓚€日期,如:20070911-1234.htm,前面的就是日期了,這樣對采集新手來說是非常有效的。

    2.不要把所有的文章都放在一個目錄下,你可以利用日期生成不同的目錄名。

    3.不要所有的文章都用一個模板,制作盡量多的模板,添文章的時候可有選要用哪個模板,一般采集者的采集程序是有針對性的,他在采集前會對你的頁面進(jìn)行分析,如果你所有的頁面排版無規(guī)律可尋,那么我想他就會放棄了。

    以上三種方法能防住初級采集的,但是對高手來說沒什么用。
   
    下面三種方法用限制采集人的IP或SESSION的方法來達(dá)到防采集的目的。

方法一:(ASP代碼):

>以下為引用的內(nèi)容:
<%
Dim AppealNum,AppealCount
AppealNum=10 ‘同一IP60秒內(nèi)請求限制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 “設(shè)計之家http://m.createwh.com提醒您:抓取很累,歇一會兒吧!”
response.end
End If
%>


第二種方法(ASP):

>以下為引用的內(nèi)容:
<%
user_agent=Request.ServerVariables(“HTTP_USER_AGENT”)
http_reffer=Request.ServerVariables(“HTTP_REFERER”)
server_name=Request.ServerVariables(“SERVER_NAME”)
‘檢查當(dāng)前用戶是否是蜘蛛人
function check(user_agent)
allow_agent=split(“Baiduspider,Scooter,ia_archiver,Googlebot,FAST-WebCrawler,MSNBOT,Slurp”,”,”)
check_agent=false
for agenti=lbound(allow_agent) to ubound(allow_agent)
if instr(user_agent,allow_agent(agenti))>0 then
check_agent=true
exit for
end if
next
check=check_agent
end function
if check(user_agent)=False then
if http_reffer=”” or left(http_reffer,len(“