当前位置:系统之家 > 技术开发教程 > 详细页面

2个容易的检测外部提交函数

2个容易的检测外部提交函数

更新时间:2022-05-13 文章作者:未知 信息来源:网络 阅读次数:


函数ChkPost()
检测用户当前所在服务器名是否存在于来源页面

代码如下: Function ChkPost()
dim server_v1,server_v2
chkpost=False
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
chkpost=False
Else
chkpost=True
End If
End function



函数PostCheck()
很简单的检测,就是检测提交是否为POST方式

代码如下: Function PostCheck()
PostCheck=False
If Lcase(Request.ServerVariables("Request_Method"))="post" Then PostCheck=True
End Function (出处:Viphot)

温馨提示:喜欢本站的话,请收藏一下本站!

本类教程下载

系统下载排行