Navigation:    Home arrow Form Image Verification
PHP Form image verification PDF  
Digg Reddit Ma.gnolia Stumble Upon Facebook Twitter Google Yahoo! MyWeb Furl" BlinkList Technorati Mixx Bookmark
Article Index
PHP Form image verification
Page 2
Page 3

When you build a form in your web page, you are susceptible to being spamed by automated systems. In order to make sure that the one who completes the form is human, you can use the system with image verification. You can see here a sample of form with a random text image verification.

Requirements :
You will need PHP and GD Graphics Library library installed. To see if you have gd installed on your server, create a file named info.php, plece the following content in it:

 

<?php
phpinfo();
?>

 

 It should appear a page with infos and you can find if you have gd installed or not.

A few rules :
1. Place an info message to instruct the user what to do.
2. Do not use too many letters! You want to secure your form, not to annoy the user.
3. A hack to this security measure is using OCR systems to "read" the text image. Use different types of fonts, rotate them in different angles and use a background image to prevent that.

Next is presented the code explained.