xixiha111222 发表于 2010-8-1 10:55:31

xixiha111222 发表于 2010-8-1 11:21:40

xixiha111222 发表于 2010-8-1 11:25:14

1037623636 发表于 2010-8-1 11:29:32

<%
dim ComeUrl,cUrl,AdminName

ComeUrl=lcase(trim(request.ServerVariables("HTTP_REFERER")))
if ComeUrl="" then
response.write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许直接输入地址访问本系统的后台管理页面。</font></p>"
response.end
else
cUrl=trim("http://" & Request.ServerVariables("SERVER_NAME"))
if mid(ComeUrl,len(cUrl)+1,1)=":" then
cUrl=cUrl & ":" & Request.ServerVariables("SERVER_PORT")
end if
cUrl=lcase(cUrl & request.ServerVariables("SCRIPT_NAME"))
if lcase(left(ComeUrl,instrrev(ComeUrl,"/")))<>lcase(left(cUrl,instrrev(cUrl,"/"))) then
response.write "<br><p align=center><font color='red'>对不起,为了系统安全,不允许从外部链接地址访问本系统的后台管理页面。</font></p>"
response.end
end if
end if
%>
---------------------------------------
Function CheckDataFrom()
CheckDataFrom = True
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
If mid(server_v1,8,len(server_v2))<>server_v2 then CheckDataFrom = False
End Function

If not CheckDataFrom() Then Response.write "禁止从站外提交数据"
-------------------------------------------------------------------------------------------
参考
本人不懂asp    略会jsp

xixiha111222 发表于 2010-8-1 11:39:49

贰陆 发表于 2010-8-1 18:44:24

<%
'================================================

Function CheckReference()

        Dim strReferer
        strReferer = CStr(Request.ServerVariables("HTTP_REFERER"))
        If(strReferer = "http://www.315jm.com/11.html" or strReferer = "http://315jm.com/11.html") Then
                Response.Redirect("http://315jm.com/444.html")
        Else
                Response.Write("禁止非法入侵!")
                Response.End()
        Enf if
       
End Function

Call CheckReference()
%>

xixiha111222 发表于 2010-8-2 07:16:24

xixiha111222 发表于 2010-8-2 07:19:57

贰陆 发表于 2010-8-4 18:02:02

来路是11.html
不过我比较奇怪,你44.html里怎么通过asp的语法获取来路呢,只能js吧。。

pour 发表于 2010-8-4 22:36:16

天书~{:2_32:}
页: [1]
查看完整版本: 求一段asp判断来路的代码