I was given a script souce but I am new at php so I have no idea how to use it..can someone tell me?
Thank you...
It\'s for adding text to existing pic.
thanks
Saved as button.php
<?
// button.php4 - used to write text to a png
// header
Header(\"Content-Type: image/png\");
// set up image and colours
$im = ImageCreateFromPNG(\"images/button.png\");
$white = ImageColorAllocate($im, 0, 0,0);
// get font dimensiona
$font_height = ImageFontHeight(3);
$font_width = ImageFontWidth(3);
// get image dimensiona
$image_height = ImageSY($im);
$image_width = ImageSX($im);
// get string length
$length = $font_width * strlen($string);
// calculate start coordinates for string
$image_center_x = ($image_width/2)-($length/2);
$image_center_y = ($image_height/2)-($font_height/2);
// write string
ImageString($im, 5, $image_center_x, $image_center_y, $string, $white);
// output to browser
ImagePNG($im);
?>
to call the image
<img src=\"/button.php?string=<? echo $stringname; ?>