April 20, 201214 yr Hey all, I'm getting blank emails from the PHP script on my website. My contact form has validated fields so something seems to be scanning the script. It's pretty basic I know, but could someone tell me what's going on and if it's possible to stop it? Spam seems to follow each blank email so whatever is happening seems to be revealing my email address although this could be coincidental. Thanks guys <?php $emailSubject = 'Website Contact Form'; $webMaster = 'xxx@xxx.co.uk'; $name = $_POST['name']; $email = $_POST['email']; $number = $_POST['number']; $message = $_POST['message']; $body = <<<EOD <br> Customer Name: $name <br> <br> Email Address: $email <br> <br> Telephone Number: $number <br> <br> Comments: $message <br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $string=nl2br($string); $success = mail($webMaster, $emailSubject, $body, $headers); ?>
April 20, 201214 yr Hey all, I'm getting blank emails from the PHP script on my website. My contact form has validated fields so something seems to be scanning the script. It's pretty basic I know, but could someone tell me what's going on and if it's possible to stop it? Spam seems to follow each blank email so whatever is happening seems to be revealing my email address although this could be coincidental. Thanks guys <?php $emailSubject = 'Website Contact Form'; $webMaster = 'xxx@xxx.co.uk'; $name = $_POST['name']; $email = $_POST['email']; $number = $_POST['number']; $message = $_POST['message']; $body = <<<EOD <br> Customer Name: $name <br> <br> Email Address: $email <br> <br> Telephone Number: $number <br> <br> Comments: $message <br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $string=nl2br($string); $success = mail($webMaster, $emailSubject, $body, $headers); ?> you have 0 spam protection thats your prob, use a prebuilt form not your own
April 20, 201214 yr Author you have 0 spam protection thats your prob, use a prebuilt form not your own Do you mean like a captcha thing or is there something that can go in the script?
April 20, 201214 yr Do you mean like a captcha thing or is there something that can go in the script? u can use captchas or a spam trap or both such as a hidden field that if it gets filled in by a bot dont let the form be sent
Create an account or sign in to comment