I can’t profess much expertise with cryptography, but I hate form spammers as much as the next guy. That’s why I designed this simple math captcha in PHP. Just include the input code in your form and the output code in your form processor. A new form field will appear asking submitters to solve an easy text-based math problem (e.g., “Two plus seven?” or “Sixteen divided by eight?”). If that problem is answered incorrectly, or the form is more than an hour old, the submission will be denied as invalid.
Note that this script is designed to block simple spambots. A dedicated human spammer or a more sophisticated bot will still be able to bypass it. If you’re looking for something more robust, I recommend giving reCAPTCHA a try. Of course, I’m also happy to improve the script for anyone who cares to offer constructive feedback.