This article illustrates an ASP's two simple examples of detecting external submit functions, the first function is Chkpost (), which detects whether the user's current server name exists on the source page, and the second function is Postcheck (), which can be easily detected to see if the commit is post.
function Chkpost ()
Detects if the user's current server name exists on the source page
The code is as follows: 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
function Postcheck ()
Very simple detection, is to detect the submission is the POST method
The code is as follows: Function Postcheck ()
Postcheck=false
If Lcase (Request.ServerVariables ("request_method") = "POST" Then postcheck=true
End Function