http://www.forosdelweb.com/f18/captcha-php-704556/
usa el mas utilizado
http://www.phpcaptcha.org/
pero realmente es sencillo hacerlo
Código PHP:
function captcha(){
$md5 = md5(microtime() * mktime());
$string = substr($md5,0,5);
$_SESSION['key'] = $string;
header("Content-type: image/png");
$im = imagecreatetruecolor(198, 48);
$bg = imagecolorallocate($im, 255, 255, 255);
imagefilledrectangle($im, 34, 2, 139, 199, $bg);
$fonts = "fonts/Blazed.ttf";
$izq = 98/2 - 42;
$t_color = imagecolorallocate($im, mt_rand(0,100), mt_rand(0,100), mt_rand(0,100));
imagettftext($im, 29, 1, $izq, 42, $t_color, $fonts, $string);
imagepng($im);
}
solo debes cargar la fonts en la carpeta.... aun que la validacion es otro tema mejor usa secureimagen !
saludos!!