/ 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.
Here's my very ugly method of doing so.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<? $q = "What does seven * eight equal?"; $word_numbers = array("one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen"); $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; ?>