| 如何防止网页的内容被别人采集,非法访问你的网站 |
| 来源:
发布时间:2008-03-05 发布人:
浏览:
人次
字体:
[大
中
小]
|
|
<% '**************************************** ' 怎么防止网页的内容被别人采集,非法的访问你的网站 '**************************************** dim onlyURL,from '***指定来源网址... onlyURL="http://127.0.0.1/" from=trim(request.serverVariables("HTTP_REFERER")) if from="" then '***来源为空:可能是直接输入网址或小偷... response.write "<div style=’display:none’><p>拒绝小偷!!!" response.write "<p>来自:" & from response.write "<p>请访问:<a href='" & onlyURL & "'>" & onlyURL &"</a>" response.write "<p><form name=’blankForm’ method=get action=’’></form>" response.write "<p><script language=""JavaScript"">blankForm.submit()</script>" & vbCRLF response.end else if inStr(from,onlyURL)<>1 then ' ***非指定来源:盗链... response.write "<div style=’display:none’><p>拒绝盗链!!!" response.write "<p>来自:" & from response.write "<p>请访问:<a href=’" & onlyURL & "’>" & onlyURL &"</a>" response.write "<p><form name=’blankForm’ method=get action=’’></form>" response.write "<p><script language=""JavaScript"">blankForm.submit()</script>" response.end else '***来源正常,将访问后面的内容... end if end if %>
| |
| |
|
|
|
|
| §最新评论:(评论内容只代表网友观点,与本站立场无关!) | |
|
|
|
|
| 注意:请勿在本站发布政治话题、色情及违反法律的内容。 |
IT知道网 声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。 |