[pmwiki-users] Email Spam

John Rankin john.rankin at affinity.co.nz
Wed Jun 13 03:20:45 CDT 2012

> I'm receiving lots of spam via an email form.
> Any suggestions on what I can do to stop it?

If it's machine-generated spam, you could try a honeypot. Add this to the

    "<div id='challenge'>To confirm you are not a real person, tick the
box: ".
    "<input type='checkbox' name='confirm' value='yes' /><br /></div>"

You also need to set

$HTMLStylesFmt['challenge'] = "
#challenge { display: none; }

Then in the code that processes the form to send the email, add this:

if (@$_POST['confirm']) Redirect($pagename);

The theory is that a machine will fill in any fields it finds in the code,
because it can't tell that the confirm field is invisible. A more or less
intelligent life form, such as a human, will unwittingly leave the field
empty, thereby avoiding the Redirect.

There is anecdotal evidence that this technique is effective in some
cases. YMMV
John Rankin

More information about the pmwiki-users mailing list