ASP判断来源URL是否来自外部

发布时间:2011年1月11日 作者:未知 查看次数:1371

ASP判断来源URL是否来自外部


'函数作用:ASP判断来源URL是否来自外部
'=============================================================
Public Function CheckOuterUrl()
On Error Resume Next
Dim server_v1, server_v2
server_v1 = Replace(LCase(Trim(Request.ServerVariables("HTTP_REFERER"))), "http://", "")
server_v2 = LCase(Trim(Request.ServerVariables("SERVER_NAME")))
If server_v1 <> "" And Left(server_v1, Len(server_v2)) <> server_v2 Then
CheckOuterUrl = False
Else
CheckOuterUrl = True
End If
End Function

 

本篇文章来自Java中文网:http://www.javaweb.cc/internet/program/asp/021834.shtml

 



版权所有!www.sieye.cn
E.Mail:sieye@sohu.com QQ:66697110