Re: Form Security using MS FrontPage 2003
Just trying to come up with something off the top of my head, this would require the use of server side programming, Javascript, and sessions (cookies) to work...
1. Generate two random numbers between 1 and 9.
2. Have an array that has the text equivalents of the numbers ($number = array('zero', 'one', 'two' ...);)
3. Calculate the sum of the two generated numbers.
4. Store the calculated sum in the user session.
5. Display in the page the question, using the text equivalents of the generated numbers (echo "$number[$n1] plus $number[$n2] equals: <input name=\"answer\"> (please enter a number between 2 and 18)";)
6. When the form is submitted, check that the value of answer is equal to what was stored in the session (if ($_POST['answer'] == $_SESSION['answer']) $user = 'not a bot';)
This is a somewhat overly simplified form of CAPTCHA, but the plain text display of the numbers should prevent most bots from answering the question. Yes, it can be defeated, but it should be somewhat effective. You could further complicate this by using a Javascript document.write method to display the question. This document.write would cause the question to be invisible to many bots, causing them to not attempt to answer the question, thus failing.
__________________
The best way to learn anything, is to question everything.
|