note 71651 added to function.imagettfbbox
| From: | haron_882 at yahoo dot ca | Date: | Sun, 10 Dec 2006 06:10:52 +0000 |
| Subject: | note 71651 added to function.imagettfbbox | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120468@lists.php.net to get a copy of this message | ||
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;
?>
----
Server IP: 193.27.201.10 (proxied: 193.27.201.10 1.0 www1.shellkonto.se:3128 (squid/2.5.STABLE4))
Probable Submitter: 212.138.64.179 (proxied: 87.109.144.215)
----
Manual Page -- http://www.php.net/manual/en/function.imagettfbbox.php
Edit -- https://master.php.net/note/edit/71651
Del: integrated -- https://master.php.net/note/delete/71651/integrated
Del: useless -- https://master.php.net/note/delete/71651/useless
Del: bad code -- https://master.php.net/note/delete/71651/bad+code
Del: spam -- https://master.php.net/note/delete/71651/spam
Del: non-english -- https://master.php.net/note/delete/71651/non-english
Del: in docs -- https://master.php.net/note/delete/71651/in+docs
Del: other reasons-- https://master.php.net/note/delete/71651
Reject -- https://master.php.net/note/reject/71651
Search -- https://master.php.net/manage/user-notes.php