% From_url = Cstr(Request.ServerVariables("HTTP_REFERER")) Serv_url = Cstr(Request.ServerVariables("SERVER_NAME")) if mid(From_url,8,len(Serv_url)) <> Serv_url and mid(From_url,8,len(Serv_url))<>"shzq.net" and mid(From_url,8,len(Serv_url))<>"www.shzq.net" then response.write "请您直接从上海知青网主页进入,谢谢" ’防止盗链 response.write "上海知青网http://shzq.net’防止盗链 response.end end if %> <% fj=request.servervariables(HTTP_REFERER) 取得来源URL if left(fj,23)=http://www.shzq.net; then &……
<% Option.Explicit Response.Buffer=Ture %> <% CheckUrl("http://shzq.net/hljpd/index.html") %> <% Function CheckUrl(url) Dim Where:Where=Request.SeverVariables("HTTP_REFERER") If Where=url Then Call main() Else Response.write("很抱歉,您必须从"http://shzq.net"访问才能进来!") End if End Function %> <% Sub main() Response.write("这儿是你要显示的网页内容") End sub %>