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