Bot Blocker Form Submit Validator
Unfortunately, nowadays there are a lot of bots online that look for forms, attempt to figure out what form fields are for what and attempt to submit the forms. So, as you may have noticed a lot of web sites are starting implement a graphic code for a human user to input into the form. These codes are made to inhibit a bot from automatically submitting form data, thus validating that the user inputting the form is human and is a human that genuinely wants to submit the form for what ever reason.
Most of those validation codes are graphics. The code below is not a graphic, but is encoded enough that only a human could enter the code into the form. What it does is randomly pick six characters that are either numbers or letters that will be either upper case or lower case. Each character, through a formula, will be encrypted and reversed to display a different character than what will be processed. There is a hidden form field that will contain another validation code as well, but it will be a different value than what the user will be asked to input.
One other cool thing about this code is that it is easy to modify whenever you feel like changing the algorithm. For example, the sample code I provide and the running example are two slightly different formulas. Whatever you do to produce the validation code, just do the opposite to check it.
Here is what it looks like (Go ahead and give it a try):
Here is the ASP code for this script: