Generate Recapcha with PHP
Step 1 : First generate captcha image. Here is php code to generate image with random code. Save it as captcha.php <?php session_start(); $code=rand(1000,9999); $_SESSION["code"]=$code; $im = imagecreatetruecolor(50, 24); $bg = imagecolorallocate($im, 22, 86, 165); //background color blue $fg = imagecolorallocate($im, 255, 255, 255);//text color white imagefill($im, 0, 0, $bg); imagestring($im, 5, 5, 5, $code, $fg); header("Cache-Control: no-cache, must-revalidate"); header('Content-type: image/png'); imagepng($im); imagedestroy($im); ?> Step 2: First start session to store captcha code in session then generate random code using php rand() function and write it on image generated by imagecreatetruecolor(). Put captcha image in html form: <html> <head> <title>My Login form</title> </head> <body> <form action="validate.php" method="post"> Enter Image Text <input...