Witam, zrobiłem sobie captche
function _generateRandomString($length=6)
{
// , array(65,90)
);
$random_string = "";
for( $i = 0 ; $i < $length ; $i++)
{
$random_string .= chr
(rand($_rand_src[$i1][0
],$_rand_src[$i1][1
])); }
return $random_string;
}
$im = @imagecreatefromjpeg("captcha.jpg");
$rand = _generateRandomString(3);
$_SESSION['captcha'] = $rand;
ImageString($im, 5, 2, 2, $rand[0]." ".$rand[1]." ".$rand[2]." ", ImageColorAllocate ($im, 0, 0, 0));
$rand = _generateRandomString(3);
ImageString($im, 5, 2, 2, " ".$rand[0]." ".$rand[1]." ".$rand[2], ImageColorAllocate ($im, 255, 0, 0));
Header ('Content-type: image/jpeg');
imagejpeg( $im, NULL, 100 );
ImageDestroy($im);
nie potrafię zwiększyć czcionki. Wg dokumentacji funkcja imageString i jej drugi parametr.
Co robię nie tak??