Few things..
-
Just a few things…
#1
if ( ! empty( $_POST['honeypot-comments'] ) )
How would this ever execute if the id and name of your honeypot are 25 character random strings?#2
<input type="hidden" id="'. RandomString(25) .'" name="'. RandomString(25) .'" />';
Bots aren’t really going to fill out a type=”hidden” field… that’s more of a vinegarpot than a honeypot. You should make it a textarea to entice them, and hide it from real users with css (or javascript is even better)#3
Even if both of those are done right, some spambots will still get through because they ignore the form you send them and just POST a standard WordPress form. To block those, you’d need to change the “name” attribute of the comment textarea to something else… which is a bit of a pain to do without breaking anything but it’s possible.
- The topic ‘Few things..’ is closed to new replies.