盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

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

时间:2024/11/26作者:未知来源:盾怪网教程人气:

[摘要]函数ChkPost() 检测用户当前所在服务器名是否存在于来源页面 代码如下: Function ChkPost() dim server_v1,server_v2 chkpost=False se...

函数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)

关键词:2个容易的检测外部提交函数




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版