I have used many recaptcha codes like Lyla Captcha, Recaptcha, Coldfusion's own Captcha, and many others free and commercial captcha techniques. They all are not fully foolproof. Therefore, I find the Math method good as it does not involve image creation or something similar. Just create some simple math and you are done with it! If you want to play more with it, you can always do the following:
1. Follow Ben Nadel's post on Math De spamming Technique
2. Make the math Calculation more Complex
3. Add the reload functionality to this – e.g., build an Image of the calculation as new image and reload it again with a new image on same page.
A very tricky technique, though we will just be playing with the random numbers and sending the details the users to solve the math operation. While this technique uses only the multiplication, addition, and subtraction methods only, while more advanced techniques can be added like modulus, division, and other such operations.
But to keep it simple, I have included the following files I am using to make this work. I welcome all you suggestions and comments if you find any way to enhance the code!
Code Samples
1a. The first file, Application.cfm:
1b. If you have Application.cfc, then use in the OnRequestStart() method:
2. The next file is the our main file where we want to use the Spam Code
3. Then at last, the page code of GetNew.cfm, which generates the spam check code:
I think you will find the code useful. We are using here some built-in functions of ColdFusion like ListGetAt, RandRange, PrecisionEvaluate, which helped us to build our match equation; therefore, read the 'livedocs' for more information!
Thanks!