Hi,
After reading about the technique of adding a hidden spam trap field to formmail scripts on a number of blogs, I had a go at adding a spam trap PHPFormMail.
The changes to the script are tagged with 'Anti-spam' in the snippet below. I've added further details of the changes that I've put in the CSS and HTML on a blog posting - http://www.reviewmylife.co.uk/blog/2008/05/30/hidden-field-spam-trap-for...
Since doing this all the spam I was previously getting from PHPFormMail is now tagged!
Regards,
reviewmylife
function send_mail()
{
global $form, $invis_array, $valid_env, $fieldname_lookup, $errors;
$email_replace_array = "\r|\n|to:|cc:|bcc:";
### Anti-spam: start - reject email ###
#if (($form['spamtrap']) != ”)
# return true;
### Anti-spam: end ###
if (!isset($form['subject']))
$form['subject'] = ‘WWW Form Submission’;
if (isset($form['subject_prefix']))
$form['subject'] = $form['subject_prefix'] . $form['subject'];
if (!isset($form['email']))
$form['email'] = ‘email@example.com’;
### Anti-spam: start - tag email ###
if (($form['spamtrap']) !=” )
$form['subject'] = ‘[SPAM?]: ‘ . $form['subject'];
### Anti-spam: end ###
switch ($form['mail_newline']) {
case 2: $mail_newline = “\r”;
break;
case 3: $mail_newline = “\r\n”;