note 71651 rejected from function.imagettfbbox by nlopess

From: Date: Sun, 10 Dec 2006 11:20:41 +0000
Subject: note 71651 rejected from function.imagettfbbox by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-120476@lists.php.net to get a copy of this message
Note Submitter: haron_882 at yahoo dot ca ---- This code is not working i don't know why its give this prb Fatal error: Call to undefined function: imagettfbbox() in /home/mywebsite/public_html/tell/Contact/sec_image.php on line 31 the Code is that ! <?php /********************************************************* *********************************************************/ //Include configuration file and function file //(default location is in the same directory) include_once('config.php'); include_once('functions.php'); $te_co = hex2bin($_GET['code']); $textstr = RC4($te_co,$IMAGE_VER_CODE); //Show Image $im = imagecreatefrompng($IMAGE_VER_BACK); //Create random size, angle, and dark color $angle = rand(-5, 5); $color = imagecolorallocate($im, rand(0, 100), rand(0, 100), rand(0, 100)); //Determine text size, and use dimensions to generate x & y coordinates $textsize = imagettfbbox($IMAGE_VER_SIZE, $angle, $IMAGE_VER_FONT, $textstr); $twidth = abs($textsize[2]-$textsize[0]); $theight = abs($textsize[5]-$textsize[3]); $x = (imagesx($im)/2)-($twidth/2)+(rand(-20, 20)); $y = (imagesy($im))-($theight/2); //Add text to image imagettftext($im, $IMAGE_VER_SIZE, $angle, $x, $y, $color, $IMAGE_VER_FONT, $textstr); //Output PNG Image header("Content-Type: image/png"); imagepng($im); //Destroy the image to free memory imagedestroy($im); //End Output exit; ?>

« previous php.notes (#120476) next »