Jump to content

.London Domains - £4
Photo

Contact form spam

Contact Form Spam

  • Please log in to reply
No replies to this topic

#1 peterb99

peterb99
  • Member
  • Newbie
  • 1 posts

Posted 29 May 2019 - 09:14

Hi,

 

I have a contact form at https://www.dataperc...act-details.php.  Recently, the number of spam submissions has increased many-fold - i.e. over 100 a day.

 

I have already (hopefully correctly!) previously implemented the following anti-spam measures, which don't seem to be stopping the spamming:

  1. Hidden form field (line 385) which I then test in my php validation page with:
    if(!empty($scrubbed['human']))
    {
    	echo "<p class=\"bg-danger\">There is a problem with the data you entered!</p>";
    	return;
    }
    

    Therefore, if the submission contains text in this field it's rejected because a human would not have seen the field.
     

  2. Random maths question - line 388, tested in my php validation page with:
// Check the maths
if ($_SESSION['answer'] != $_POST['answer'] )
{
	echo "You entered ".htmlentities($_POST['answer']).", which is ";
	echo '<span style="color: #FF0000; font-weight: bolder;">incorrect</span>. The correct answer is '.$_SESSION['answer'].'.  Please click your browser\'s \'Back\' button and try again.';
	return;
}

I don't understand why I'm still getting spam submissions.  Surely a bot would have to be quite sophisticated to work through both tests?

 

Ideally I'd like to avoid a recaptcha.  I hope I've provided enough information - any advice would be greatly appreciated!  Thanks.

 

Pete

 

 


  • 0





Also tagged with one or more of these keywords: Contact Form, Spam

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users