some questions about CAP image verification.
Posted: Mon Jun 28, 2010 2:44 am
first, here is my cap php code:
it shows me an image with white background, (and changin' numbers of course).
i whould like to know how can i change the background that displays behind the numbers, and also change numbers color randomaly?
thanks, sorry for my english =)
Code: Select all
session_start();
header("Content-type: image/png");
$im = @imagecreate(110, 40)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 33, 25, 57);
$rand = rand(11111111,99999999);
imagestring($im, 50, 20, 20, $rand, $text_color);
$_SESSION['code'] = $rand;
imagepng($im);
imagedestroy($im);i whould like to know how can i change the background that displays behind the numbers, and also change numbers color randomaly?
thanks, sorry for my english =)
