PHP Code:
$font = imageloadfont('default.gdf');
PHP Code:
$im = imagecreate(28, 12);
if($colorscheme == 0) { $col1 = ImageColorAllocate($im, 255, 255, 255); $col2 = ImageColorAllocate($im, 0, 0, 0); } else { $col1 = ImageColorAllocate($im, 0, 0, 0); $col2 = ImageColorAllocate($im, 255, 255, 255); }
srand((double)microtime()*1000000); $string = md5(rand(0,9999)); $new_string = substr($string, 17, $wordlength);
imagefill($im, 0, 0, $col2);
imagestring($im, $font, 2, 2, $new_string, $col1);
$veriword=$new_string;
imagepng($im, "verify.png"); imagedestroy($im);
What's wrong, I get this error
Code:
Warning: imageloadfont(default.gdf): failed to open stream: No such file or directory in /home/.../public_html/ on line 6
But the visual image still works.
|