A simple php captcha image tutorial
Captcha is a test for user if he is real human or computer. In this example we use PHP GD2 functions to create the image on the fly. To test this functionality we need following files.We already discussed about anti spam web contact form in my provious post.this is one of methods.
Php_captcha.php :- in this file we create the captcha image and store the data in PHP session.
Captcha_test.phpl :- in this file we run the user form and validate the user for is he bot or not.
captcha.JPG :- this image is used as back ground for generated PHP captcha. This file must have at least read permission on the main server.
You can download the source code here and you can test in your local server. Remember your PHP must have GD extension to run this example. You can read comments on the script for detail explanation.
Example source Code
php_captcha_example_tutorial_source code

