We used Captcha.php in one of our projects, it opens in all browsers, but we cannot view chrome Version 22 in Google.
Our Captcha script
session_start(); $captcha = new SimpleCaptcha(); $captcha->CreateImage(); class SimpleCaptcha { function CreateImage() { header("Content-Type: image/jpeg"); $md5 = md5(rand(0,9999)); $pass = substr($md5, 10, 5); $_SESSION["pass"] = $pass; $image = ImageCreatetruecolor(100, 20); $clr_white = ImageColorAllocate($image, 0, 0, 0); $clr_black = ImageColorAllocate($image, 255, 255, 255); imagefill($image, 0, 0, $clr_white); imagefontheight(15); imagefontwidth(15); imagestring($image, 5, 30, 3, $pass, $clr_black); return imagejpeg($image); imagedestroy($image); } }
HTML embedding
<img src="code/captcha.php" width="100" height="20" alt="Captcha Code"/>
We cannot view it in Google Chrome. All browsers return the same image.
source share