No site submission form

zhaozj2021-02-12  134

Use the ASP to minus the workload of the server, so you should use JavaScript to submit all submission fields after using JavaScript or VBScript detection, so that the server will not be detected, and someone may modify Script from local by submitting In this way, there is a security submission, so it should be required to submit from the server breaking path, and other addresses submit are not invalid:

code:

$ servername = $ http_server_vars ['Server_name'];

$ sub_from = $ http_server_vars ["http_refeerer"];

$ sub_len = Strlen ($ servername);

$ Checkfrom = Substr ($ SUB_FROM, 7, $ SUB_LEN);

IF ($ Checkfrom! = $ servername) {

Echo ("" data source is incorrect! Please submit from this site! ");

EXIT;

}

?>

? <$ Servername = $ HTTP_SERVER_VARS [ 'SERVER_NAME']; $ sub_from = $ HTTP_SERVER_VARS [ "HTTP_REFERER"]; $ sub_len = strlen ($ servername); $ checkfrom = substr ($ sub_from, 7, $ sub_len); if ($ Checkfrom! = $ servername) {echo ("data source is incorrect! Please submit from this site!"); exit;}?>

转载请注明原文地址:https://www.9cbs.com/read-6835.html

New Post(0)