怎樣防止網(wǎng)頁(yè)的內(nèi)容被別人采集_JSP教程
推薦:淺析JSP分頁(yè)教程JSP分頁(yè)教程 html xmlns=1999/xhtml head meta http-equiv=Content-Type content=text/html; charset=gb2312 / title設(shè)計(jì)家園jsp教程/title % //連接字符串 Class.forName(org.gjt.mm.mysql.Driver); Connection connection=Drive
<%
'****************************************
' 怎么防止網(wǎng)頁(yè)的內(nèi)容被別人采集,非法的訪問(wèn)你的網(wǎng)站
'****************************************
dim onlyURL,from '***指定來(lái)源網(wǎng)址...
onlyURL="http://127.0.0.1/"
from=trim(request.serverVariables("HTTP_REFERER"))
if from="" then '***來(lái)源為空:可能是直接輸入網(wǎng)址或小偷...
response.write "<div style=’display:none’><p>拒絕小偷!!!"
response.write "<p>來(lái)自:" & from
response.write "<p>請(qǐng)?jiān)L問(wèn):<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
' ***非指定來(lái)源:盜鏈...
response.write "<div style=’display:none’><p>拒絕盜鏈!!!"
response.write "<p>來(lái)自:" & from
response.write "<p>請(qǐng)?jiān)L問(wèn):<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 '***來(lái)源正常,將訪問(wèn)后面的內(nèi)容...
end if
end if
%>
分享:淺談Java 使用jdbc:odbc 建立無(wú)源連接access數(shù)據(jù)庫(kù)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 response.sendRedirect不跳轉(zhuǎn)的原因分析及解決
- JSP指令元素(page指令/include指令/taglib指令)復(fù)習(xí)整理
- JSP腳本元素和注釋復(fù)習(xí)總結(jié)示例
- JSP FusionCharts Free顯示圖表 具體實(shí)現(xiàn)
- 網(wǎng)頁(yè)模板:關(guān)于jsp頁(yè)面使用jstl的異常分析
- JSP頁(yè)面中文傳遞參數(shù)使用escape編碼
- 基于jsp:included的使用與jsp:param亂碼的解決方法
- Java Web項(xiàng)目中連接Access數(shù)據(jù)庫(kù)的配置方法
- JDBC連接Access數(shù)據(jù)庫(kù)的幾種方式介紹
- 網(wǎng)站圖片路徑的問(wèn)題:絕對(duì)路徑/虛擬路徑
- (jsp/html)網(wǎng)頁(yè)上嵌入播放器(常用播放器代碼整理)
- jsp下顯示中文文件名及絕對(duì)路徑下的圖片解決方法
JSP教程Rss訂閱編程教程搜索
JSP教程推薦
猜你也喜歡看這些
- 使用靜態(tài)類(lèi)實(shí)現(xiàn)JSP自定義標(biāo)簽
- JSP初級(jí)教程之跟我學(xué)JSP(七)
- hibernate的緩存和CRUD
- Sun微系統(tǒng)預(yù)計(jì)下一代Java手機(jī)技術(shù)年內(nèi)將問(wèn)世
- 網(wǎng)頁(yè)無(wú)閃自動(dòng)局部刷新實(shí)例
- jsp中session過(guò)期設(shè)置及web.xml配置學(xué)習(xí)
- JSP初級(jí)教程之跟我學(xué)JSP(三)
- 如何學(xué)習(xí)JSP
- JSP初級(jí)教程之跟我學(xué)JSP(六)
- jsp上傳圖片即時(shí)顯示效果代碼
- 相關(guān)鏈接:
- 教程說(shuō)明:
JSP教程-怎樣防止網(wǎng)頁(yè)的內(nèi)容被別人采集
。