防止被采集的代碼_風(fēng)訊Cms教程
<%
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("http://"&server_name) 1)<>"http://"&server_name&"/" then
%>
<html><body>
<form action='' name=checkrefer id=checkrefer method=post>
</form>
<script>
document.all.checkrefer.action=document.URL;
document.all.checkrefer.submit();
</script>
</body></html>
<%response.end
end if
end if
%>
- 最簡單的欄目切換方法(樣式系列之欄目切換篇2)
- 我也放個欄目切換代碼,簡簡單單的。
- 搜狐女性頻道幻燈效果(幻燈系列之flash特效篇)
- 有效控制新聞內(nèi)容的圖片的尺寸
- 現(xiàn)提供增加<目錄生成規(guī)則>的方法!
- 風(fēng)訊里面上下篇標(biāo)簽DIV模式下浮動的解決方法!
- 風(fēng)訊目錄路徑自由選擇的實(shí)現(xiàn)方法
- 新聞列表讀取內(nèi)容時去掉html代碼
- 添加文字廣告的解決方案!
- 發(fā)些滾動的代碼
- 標(biāo)題下的分隔線在4.0中如何設(shè)置,還有標(biāo)題的行間距
- 隨時更換模版、廣告等,無須重新生成整站,共享出來供討論
- 相關(guān)鏈接:
- 教程說明:
風(fēng)訊Cms教程-防止被采集的代碼
。