security image font change
Posted: Wed Jan 30, 2008 8:09 am
Here is my very simple code for making security image, I am not happy with font style and size, Please help me so that i can change the font size and style
thank you
~pickle | Changed your code tags to php rather than text
Code: Select all
<?PHP
$str = str_shuffle('abcdefghijklmnopqrstuvwxyz0123456789');
$substr = substr($str, 0, 6);
$im = imagecreate(60, 25);
// white background and blue text
$bg = imagecolorallocate($im, 255, 255, 255);
$textcolor = imagecolorallocate($im, 0, 0, 0);
// write the string at the top left
imagestring($im, 9, 2, 4, $substr, $textcolor);
// output the image
header("Content-type: image/png");
imagepng($im);
?>
~pickle | Changed your code tags to php rather than text