怎样防止网页的内容被别人采集_JSP教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

推荐:浅析JSP分页教程
JSP分页教程 html xmlns=1999/xhtml head meta http-equiv=Content-Type content=text/html; charset=gb2312 / title设计家园jsp教程/title % //连接字符串 Class.forName(org.gjt.mm.mysql.Driver); Connection connection=Drive

 

<%
'****************************************
' 怎么防止网页的内容被别人采集,非法的访问你的网站
'****************************************
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
%>

 

分享:浅谈Java 使用jdbc:odbc 建立无源连接access数据库
package puyue; import java.sql.*; import java.io.*; import java.util.*; public class accesslink{ private String url=jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};dbq=e:\\java\\puyue.mdb; ResultSet rec; public accesslink() { try { Cl

来源:模板无忧//所属分类:JSP教程/更新时间:2010-05-20
相关JSP教程