Use asp to minimize the workload on the server side. In this way, you should use more JavaScript and submit all submission fields to the server after using JavaScript or VBScript. In this way, the server does not have to detect it again. When submitting, someone may modify the script to submit it locally. This has the problem of safe submission, so you should require the submission from the server to be broken. Submission from other addresses is invalid:
Copy the codeThe code is as follows:
<%
server_v1=Cstr(("HTTP_REFERER"))
server_v2=Cstr(("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
"<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>"
"<tr><td style='font:9pt Verdana'>"
"The path you submitted is incorrect. Please do not mess with this parameter if you are prohibited from submitting data from outside the site!"
"</td></tr></table></center>"
end if
%>
For example, the above code is named check_path.asp to save, and it is enough to reference every time the form is submitted:
<!--#include file="check_path.asp"-->