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 session_start(); $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); Code (markup): thank you
I'm pretty sure you can load a .ttf file on the server side. Check out Peter's anti-spam plugin for wordpress, he does it in that code
Use the function that nico_swd suggested. http://www.wedwick.com/wftopf.exe : Use this tool to convert win fonts to gd fonts.