doforumda Posted November 11, 2009 Share Posted November 11, 2009 hi i have a problem creating captcha system. i create some basic script for image displaying but it says this error The image “http://localhost/examples/captcha.php” cannot be displayed, because it contains errors. my code is here <?php $img = imagecreatetruecolor(80,30); $white = imagecolorallocate($img, 255, 255, 255); $black = imagecolorallocate($img, 0, 0, 0); $red = imagecolorallocate($img, 255, 0, 0); $pink = imagecolorallocate($img, 200, 0, 150); imagefill($img, 0, 0, $black); imagettftext($img, 12, 0, 15, 15, "calibri.ttf", "hello"); header("Content-type: image/png"); imagepng($img); imagedestroy($img); ?> where is the error and how it can be fixed? Link to comment https://forums.phpfreaks.com/topic/181114-need-help-in-creating-captcha/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.