A honeypot is quite simple, but must be validated server side,or it won't work.
The simplest of honeypot form is that bots don't recognize css styles. So adding a style to your stylesheet like:
Code:
.check
{
display: none;
}
This would hide the element with: class="check" from a human visitor, but a bot would still see it.
So,
Code:
<input class="check" type="text" name="real_name" value="" />
would be seen by a bot, and not a human.
We would then validate that field when submitted
PHP Code:
if(!empty($_POST['real_name'])) echo 'A bot sent this message';
else { Do the rest of your form code here }
I have used honeypots on several of my forms, without any reCAPTCHA or any type of user submitted form controls.
To see if this is even catching any bots, you can save any submittals that have this input filled out to a database.
PHP Code:
if(!empty($_POST['real_name'])) {
echo 'A bot sent this message';
$sql = "UPDATE `bots` SET `submittedForms`= submittedForms + 1 WHERE `type`='email'";
if(mysql_query($sql)) echo 'Your submission has been recorded';
}
else { Do the rest of your form code here }