Page 1 of 1
what is the Best captcha protect from spam in php
Posted: Fri Dec 16, 2011 12:16 am
by snvs
what is the Best captcha protect from spam in php
Re: what is the Best captcha protect from spam in php
Posted: Fri Dec 16, 2011 1:21 am
by Christopher
Re: what is the Best captcha protect from spam in php
Posted: Fri Dec 16, 2011 11:48 am
by php3ch0
A good trick I learned (not sure from where) was to add an extra field in e.g email2 then hide it in the CSS.
When validating your form check to make sure that the field is empty then it will be a human otherwise it must be a bot (which fill in all the fields). Problem solved and no captcha required.
this system has been almost fool proof for me for the last few years.
Just dont spread the word too much!
Re: what is the Best captcha protect from spam in php
Posted: Fri Dec 16, 2011 1:22 pm
by twinedev
That method is called a Honeypot, and is what I normally use as well. Be sure that for accessibility, you put a label on it that says "this field needs to be left blank", so those who may hit the site with a reader know not to put anything in it. Also, I usually call it something like "URL", just to really catch a bot's attention in case it looks to only fill in specific fields. They love posting URL's LOL
Another thing I use, mainly on WP sites that get a bunch of traffic is that I modify forms people submit to store the timestamp in the form as a hidden value, and when the form is submitted check to make sure the time stamp is within like 30-60 minutes ago. (you have to read-add it each update for WP, but when you are used to where it is, easy to do) I store the value using a function like the sample I put here:
viewtopic.php?f=1&t=132062&p=664803 so that it is not so obvious what it is, and even if they figure out that is the timestamp, they will have one heck of time trying to set a "current" timestamp with the bot
-Greg