webproclaim Posted August 16, 2006 Share Posted August 16, 2006 I wrote this script that creates an image and then places a random string of characters on the image and runs a line thru them. (This is something I use along with forms to block bots from auto posting them if you are interested). Anyway, I just setup a new server and now this script it does not work properly. It creates the image and the line in the image, but the text does not appear on the image. I verified that the times.ttf file is the the proper place. Also, this new server is running the same version of PHP as my other server where this script works (even using an identical copy of the php.ini file).I just cant seem to figure out why this would work on one server and not the other. It has to be something system related but I just can't figure it out. Any help with this would be appreciated.<?php $TheImage = Imagecreate("75", "25"); $ColorImage = imagecolorallocate($TheImage, 180, 50, 23); $ColorText = imagecolorallocate($TheImage, 0, 0, 0);$ColorLine = imagecolorallocate($TheImage, 75, 75, 75); $secret = substr(md5(uniqid(rand())), 0, 5);$secret = strtoupper($secret);session_start();session_register("Dingy");$Dingy = $secret;imageline($TheImage, 75, 8, 0, 15, $ColorLine);ImageTTFText($TheImage, 12, -5, 16, 20, $ColorText, "times.ttf", $secret); header("Content-Type: image/PNG"); ImagePng ($TheImage); imagedestroy($TheImage);?> Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.