/ Published in: PHP
Honestly, this is supposed to be a programming site. What person who would be creating a bot for this site wouldn't be able to crack the spambot protection?
Here's my very ugly method of doing so.
Expand |
Embed | Plain Text
<? $q = "What does seven * eight equal?"; $word_numbers = array("one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen"); $q = str_ireplace($word_numbers, $numbers, $q); $q = str_ireplace($word_signs, $signs, $q); $first_number = $out[1]; $second_number = $out[3]; switch($out[2]) { case '+' : $answer = $first_number+$second_number; break; case '-' : $answer = $first_number-$second_number; break; case '*' : $answer = $first_number*$second_number; break; case '/' : $answer = $first_number/$second_number; break; default : $answer = "Failed"; break; } echo $answer; ?>
Comments
Subscribe to comments
You need to login to post a comment.

Clever :)
But what do you do if I turn the text into an image?
Then you have a spambot protection system that's not so easily defeated, and I suppose I'll have to do all my hardcore spamming the hard way. :P
But I wouldn't take the route of a genuine captcha unless it's really needed. They just annoy real humans, and spammers can do their dirty work manually.
Anyway, love the site. Keep up the good work. :)