va dau si eu codul meu pentru captcha asa arata aveti nevoie de un .ttf ca sa iti deseneze literele asa cum vrei tu. puteti alege dintre cele de aici http://www.webpagepublicity.com/free-fonts.html valoarea corecta a captcha-ului cu care trebuie sa faceti compariatia este in $_SESSION['human'] <?php include ('config.php'); $_SESSION['human'] = ''; for ($i=0 ; $i < 6 ; $i++ ) { $_SESSION['human'] .= strtoupper(chr(rand(97,122))); } $imageX = 160; $imageY = 40; $captcha = imagecreatetruecolor($imageX, $imageY); for ($i=0 ; $i < $imageX; $i++) { $circleColor = imagecolorallocate($captcha, rand(0, 255), rand(0, 255), rand(0, 255)); imageellipse($captcha, rand(0, $imageX), rand(0, $imageY), rand($imageX / 10, $imageX / 10 * 2), rand($imageX / 10, $imageX / 10 * 2), $circleColor); } for ($i=0 ; $i < $imageX; $i++) { $circleColor = imagecolorallocatealpha($captcha, rand(0, 255), rand(0, 255), rand(0, 255), rand(75, 127)); imagefilledellipse($captcha, rand(0, $imageX), rand(0, $imageY), $imageX / 10, $imageX / 10, $circleColor); } $font = 'font/matrix.ttf'; $fontSize = 25; $angle = 0; $box = imagettfbbox($fontSize, $angle, $font, $_SESSION['human']); $ttfX = (int) rand( 0, $imageX / 6 ); $ttfY = $imageY / 2 + $imageY / 4; $k=0; while($k < strlen($_SESSION['human'])) { $angle = ((rand(0,1) == 0) ? rand(0, 20) : rand(340, 360)); $ttfColor = imagecolorallocate($captcha, rand(0, 50), rand(0, 50), rand(0, 50)); imagettftext($captcha, $fontSize, $angle, $ttfX + $k * 20, $ttfY, $ttfColor, $font, $_SESSION['human'][$k]); imagettftext($captcha, $fontSize, $angle - rand(0, 5), $ttfX + $k * 20, $ttfY, $ttfColor, $font, $_SESSION['human'][$k]); imagettftext($captcha, $fontSize, $angle + rand(0, 5), $ttfX + $k * 20, $ttfY, $ttfColor, $font, $_SESSION['human'][$k]); $k++; } for ($i=0 ; $i < $imageX / 3; $i++) { $circleColor = imagecolorallocatealpha($captcha, rand(0, 255), rand(0, 255), rand(0, 255), rand(115, 127)); imagefilledellipse($captcha, rand(0, $imageX), rand(0, $imageY), rand($imageX / 10, $imageX / 10 * 2), rand($imageX / 10, $imageX / 10 * 2), $circleColor); } for ($i=0 ; $i < $imageX / 3; $i++) { $lineColor = imagecolorallocatealpha($captcha, rand(0, 255), rand(0, 255), rand(0, 255), rand(100, 127)); imageline($captcha, rand(0, $imageX), rand(0, $imageY), rand(0, $imageX), rand(0, $imageY), $lineColor); } header('Content-type: image/png'); imagepng($captcha); imagedestroy($captcha); ?>