方式一:
复制代码 代码如下:<%
Function IsSelfRefer()
Dim formUrl,relUrl
formUrl=LCase(Trim(request.ServerVariables("HTTP_REFERER")))
If formUrl="" Then
IsSelfRefer = False
Else
relUrl="http://" & Trim(Request.ServerVariables("SERVER_NAME"))
If (formUrl<>relUrl) Then
IsSelfRefer = False
Else
IsSelfRefer = True
End If
End If
End Function
%>
方式二:
复制代码 代码如下:<%
Function IsSelfRefer()
Dim sHttp_Referer, sServer_Name
sHttp_Referer = CStr(Request.ServerVariables("HTTP_REFERER"))
sServer_Name = CStr(Request.ServerVariables("SERVER_NAME"))
If Mid(sHttp_Referer, 8, Len(sServer_Name)) = sServer_Name Then
IsSelfRefer = True
Else
IsSelfRefer = False
End If
End Function
%>
复制代码 代码如下:<%
Function IsSelfRefer()
Dim formUrl,relUrl
formUrl=LCase(Trim(request.ServerVariables("HTTP_REFERER")))
If formUrl="" Then
IsSelfRefer = False
Else
relUrl="http://" & Trim(Request.ServerVariables("SERVER_NAME"))
If (formUrl<>relUrl) Then
IsSelfRefer = False
Else
IsSelfRefer = True
End If
End If
End Function
%>
方式二:
复制代码 代码如下:<%
Function IsSelfRefer()
Dim sHttp_Referer, sServer_Name
sHttp_Referer = CStr(Request.ServerVariables("HTTP_REFERER"))
sServer_Name = CStr(Request.ServerVariables("SERVER_NAME"))
If Mid(sHttp_Referer, 8, Len(sServer_Name)) = sServer_Name Then
IsSelfRefer = True
Else
IsSelfRefer = False
End If
End Function
%>
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“asp实现防止站外提交内容的两个方法”评论...