CAPTCHA which stands for “Completely Automated Public Turing test to tell Computers and Humans Apart” is a type o f challenge-response test to ensure that the response is only generated by humans and not by a computer.
In simple words, CAPTCHA is the word verification test that you will come across the end of a sign-up form while signing up for Gmail or Yahoo account. The following image shows the typical samples of CAPTCHA.
You can make captcha using PHP. Here I am making number
captcha which is achieved by an image. This image text is dynamically create by
php and stored in session. A user can verify whether valid captcha has been
entered or not.
Save this code in named captch.php
<?php
session_start();
$text = rand(10000,99999);
$_SESSION["vercode"] = $text;
$height = 25;
$width = 65;