Posted by Don Khuth on 09/28/19 11:43
"KoRnDragon" <korndragon@gmail.com> wrote in message
news:1143430063.601434.144680@u72g2000cwu.googlegroups.com...
> I'm getting spam almost daily now from bots crawling my site. Well it
> seems they've learned how to work a form as well. I added $_POST for
> the form but it seems that's not enough anymore. Any suggestions?
> Blocking keywords for the bots won't help. I need a better alternative.
>
> Thanks in advance!
>
Random turing numbers seems to be working for me so far. I have had
any spam since I implemented that.
<?php
srand((double)microtime()*1000000);
$string = md5(rand(0,9999));
$_SESSION["turing"] = substr($string, 0, 5);
?>
When the form is posted, check the posted value with the session value,
chances are the post was made by a real person.
[Back to original message]
|