|
||||||||
IMAGIZE Captcha Form Processing Image Verification README FILE. |
||||||||
| IMAGIZE Captcha Form Processing Image Verification is an easy to use, easy to install, easy to modify CAPTCHA script using PHP and the GD Library. NO PROGRAMMING KNOWLEDGE IS REQUIRED. INSTALLATION INSTRUCTIONS: These instructions assume you have an already functioning form. If not thqat is OK please reference the example.php file inclued in the download! First Upload extract the content of the ZIP file you downloaded. This Package Contains everything you see on the demo site. Upload the entire package in the root folder of your website. If some of these folder already exist, no problem simply add the files to the existing folders.
Then find the folder called config in the imagize folder, edit the file named config.php The only edit that is required is editing your domain name like so: $imagizeDomain = "atwebresults.com"; Change what is in between the double quotes to your domain name, make sure not to include any HTTP://, www, or any subdomain info, or the trailing slash, just the domain like it is in the example. There are other optional variables you can change, to manipulate the color of the characters etc. These are optional and by no means necessary. This file is well documented to walk you through the option configurations.
First make sure that the page with your form has an extension of .php
Next on the very first line above all else add the following block of code: <?php include("../imagize/config/config.php"); if($USE_SESSIONS){ @ini_set('session.use_trans_sid', false); @ini_set('session.use_only_cookies', true); @ini_set('url_rewriter.tags', ''); @session_start(); }else{ @ini_set('session.use_trans_sid', false); @ini_set('session.use_only_cookies', true); @ini_set('url_rewriter.tags', ''); } ?> This will ensure that the proper PHP INI SETTING ARE IN PLACE JUST MAKE SURE THAT THE INFORMATION IN BETWEEN THE DOUBLE QUOTES IN THE include() function contains a relative pathe to the config.php file Now on to the form: Somewhere between you <form> and </form> tags and usually above the submit button you will need to add the following code, please note, this can be in a <div> <td> or anywhere on your page and with any styling you see fit. Enter what you see in the image in the box below using only lowercase A - Z & the numbers 2 - 9 <br> <br> <img src="../imagize/random_image.php" border="0" style="border: 1px solid black;"> <br> <br> <input name="imagize_number" type="text" id="imagize_number" style="width: 200px;"> AND FOR THE FORM THAT IS IT, EASY, HUH? OK ON TO THE PROCESSING SIDE: If you are subitting this form to itself there is no need for the following block of code, if however you are submitting the form to a different page you will again need to add the following code at the very top: <?php include("../imagize/config/config.php"); if($USE_SESSIONS){ @ini_set('session.use_trans_sid', false); @ini_set('session.use_only_cookies', true); @ini_set('url_rewriter.tags', ''); @session_start(); }else{ @ini_set('session.use_trans_sid', false); @ini_set('session.use_only_cookies', true); @ini_set('url_rewriter.tags', ''); } ?> Once that is in place you have 1 of 2 block of code to add, the system is defaulted to use cookies which would require this block of code: <?php $imagize_number = $_REQUEST['imagize_number']; if(md5($imagize_number) != $_COOKIE['imagize_value']){ // Place Here What to do if it the image validation is wrong, an easy but not very gracefull error would be as follows die("Image Validation Failed, Please use your browsers back button to try again") } ?> If you changed the config file to use sessions it is very similar, but this is the code you would use: <?php $imagize_number = $_REQUEST['imagize_number']; if(md5($imagize_number) != $_SESSION['imagize_value']){ // Place Here What to do if it the image validation is wrong, an easy but not very gracefull error would be as follows die("Image Validation Failed, Please use your browsers back button to try again") } ?> AND THATS IT YOUR DONE! CONRATS. The example form is included in the download, for easy reference, it is simply copy and paste to have image validation on your forms DEMO LOCATED HERE: http://www.atwebresults.com/captcha_form_image_verification/index.php |
||||||||
| Opps! Did I Make A Mistake or Miss Something? Please Let everyone know Here | ||||||||