Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Comments for: weiner20050831

Message # 1510570:
Date: 04/21/08 10:26
By: James
Subject: RE: How to stop BOTS from SPAMMING my PHP For

The best method I found for stopping spam in my forms was:
1) If there is more than one "http://" in the message, don't post it
2) Validate the e-mail using it's MX record
3) Call the form names something random - i.e. instead of <input name="email"> do <input name="sadkfmdlzfgnzfchblkzdxcm">. Additionally, make the form field descriptions (i.e. the text that says "E-Mail:") into an image. That way, most spam bots won't know which field is which and only humans will be able to enter data into the form.

Have a look here for an example:
http://www.frosthold.com/index.php?q=guest

Previous Message | Next Message


Comments:
Excellent - thankspurplepomegranite09/28/09 07:06
Great article!Swiftaxe02/18/09 05:40
RE: PHP Form Validation System: An Object-Orientewilliam05/19/08 20:55
BullshhitFcuk! (make the change for me will ya)05/06/08 14:50
Help me to how to design a clocking systemNutty05/05/08 05:44
RE: How to stop BOTS from SPAMMING my PHP ForJames04/21/08 10:26
RE: How to stop BOTS from SPAMMING my PHP Forchris04/18/08 18:35
do not support class and functionmount09/21/07 04:42
need helpMaurice.Mullenders11/07/05 18:50
php codingcaesar olima10/16/05 08:55
XtraPHPPeter Jukel09/20/05 02:22
Reinventing the Wheel!!David Grinberg09/13/05 20:44
How to stop BOTS from SPAMMING my PHP FormJorge Borges09/12/05 23:56
PHP Form Validation System: An Object-OrienteNorman Wingrove09/06/05 22:04
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.