Human Intelligence Identification Script
The Human Intelligence Identification Script (Hii) is designed to prevent web forms being submitted by automated robot scripts. Automated robot scripts are used maliciously to send Form Spam and Hijack Web Forms. The Human Intelligence Identification Script only allows form processing if a correct answer to a set question is provided when the form is submitted. The question can be in any format or structure. A script robot cannot interpret the meaning of a text question nor does it have the capacity to provide a correct answer. In fact it does not even know an answer is required. This applies for even the simplest of questions. The Human Intelligence Identification Script is designed to run with any Form1 based form processing code including Form1 Builder Software, Form1 Builder GoldMine and Form1 Builder MYSQL. It may also run with other php based form processing scripts.
What is Form Spam? provides additional information on Form Spam and how to prevent it. Information on Form Hijacking is available at What is Form Hijacking?. The Human Intelligence Identification Script should only be used as an additional method in preventing Form Hijacking. Methods outlined in What is Form Hijacking? should also be applied. The Form Spam Blocking Script may also be of interest, it blocks form submissions that include blocked character combinations effectively stopping all form spam from being sent. The character combinations can represent words, email addresses, IP addresses or any other information that is processed.
How does Human Intelligence Identification work?
The Human Intelligence Identification Script looks for the Human Intelligence Identification Answer provided in a form submission. If the Answer is not correct the form will not be processed. This effectively prevents forms submitted by automated robot (bot) scripts from being processed. It blocks automated form span and can also decrease the risk of form hijacking.
The concept underlying the Human Intelligence Identification Script is similar to the that used in Captcha. Captcha is the application of distorted text images that are difficult for bots to decipher. It is extensively used as a human verification test in web form submissions to block automated form submissions by bots. Human Intelligence Identification possesses the advantages of Captcha but is much simpler to implement, cannot be bypassed using OCR (optical character recognition) and is more user friendly, with less accessibility issues. Human Intelligence Identification is an easy to implement, east to use, and effective alternative to Captcha.
To use the script
- Download the script using the link below and unzip the downloaded file.
- Open the script file (.php) using a text editor (ie notepad).
- In the script file set the Human Intelligence Identification Answer in the $hiianswer variable in the script by inputting the answer between the " 's. The answer should be in lowercase letters. For example: $hiianswer="a";
- In your form add the Human Intelligence Identification Question and an input field for the Human Intelligence Identification Input by the form user. For example: What is the first letter of the alphabet? <input type="text" name="hii" /> . The name value of the input field must be the same as the $hiifieldname variable in the script. The default is $hiifieldname="hii"; .
- If desired you can also set a Url to be displayed if no Human Intelligence Identification Input is provided by the user. For example: $hiirequiredurl="http://www.mydomain.com/hiirequired.html"; . If $hiirequiredurl is left empty the default Hii required message is displayed.
- If desired you can also set a Url to be displayed if the wrong Human Intelligence Identification Input is provided by the user. For example: $hiierror="http://www.mydomain.com/hiierror.html"; . If $hiierror is left empty the default Hii error message is displayed. If $hiierror is set as none a blank page is displayed when an incorrect hii answer is given. For example: $hiierror="none"; .
- Copy and paste all the Hii script code (including the php start and end tags) to the very top of your Form1 processing code above all other code. Only use a text editor for this process to ensure the php code is not corrupted.
- Upload your modified Form1 with Human Intelligence Identification and give it a test.
If a form is submitted without the correct Human Intelligence Identification Answer form processing is blocked, no delivery email is sent and nothing is displayed. If a form is submitted without a Human Intelligence Identification Answer the $hiirequiredurl is displayed if provided or the default Hii required message is displayed. The Question and Answer used can be pretty much anything you like but it should be simple and clear. A human should never get it wrong. If the wrong answer is given it is most likely a robot and processing is terminate, no email sent and nothing is displayed (so the robot has no where left to go). For example:
- What is the first letter of the alphabet?
- What is the background color of this web page?
- What is the third letter in the word three?
- What letter is bold in this sentence?
- What is the third word in the first paragraph on this page?
One of the strengths of Human Intelligence Identification is that the Question can be freely set by the form developer. This makes it very difficult for bot developers to identify a question pattern and related answer that can be programmed into the bot.
The question can be generic, related directly to your site or type of visitor, a common joke, a fill in the blank, some text on your page, java script prompt text, a select dropdown list, radio buttons or even a password (if you want to limit form submissions even for some real users).
You can see the script in action and give it a test at the Human Intelligence Identification Test Form.
Download Human Intelligence Identification Script using the link below. Unzip the downloaded file and modify the script file (.php) in a text editor.
Download Human Intelligence Identification Script
Compressed Zip file - hiis.zip 2 kb
To download click the download link and save the downloaded file to your computer. The script is downloaded as a Compressed Zip file (.zip) it must be unzipped before you can access the script file. Trial Zip software is available free from Winzip or a simple freeware zip utility is available from JustZIPit.
Conditions of Use
The specific suitability of this script must be independently assessed. It is provided as is, use is entirely at the users risk, and use acknowledges that softSWOT and all associated parties are held harmless from any claims or losses relating to software provided.
Requirements for Use
To run this script your server must support the php scripting language. Most commercial web servers support php. For information on php and how to check if it is available on your server go to What is php?
What if my server does not support php?
If you do not currently have a hosting company that supports php we use and recommend IX Web Hosting. IX Web Hosting provide a range of reliable and economical hosting packages (from $3.95 / month), all with php support.