Code: Select all
<?php
// set the content-type
header('Content-type: image/png');
// image background in png format
$im = imagecreatefrompng ("background.png");
// some color in RGB
$color = imagecolorallocate($im, 255, 255, 255);
// the text to be printed
$text = $_GET['name'];
// set the font
$font = 'arial.ttf';
// set the font size
$size = 8;
// add the text to the image
imagettftext($im, $size, 0, 55, 14, $color, $font, $text);
imagepng($im);
imagedestroy($im);
?>Code: Select all
imagettftext($im, $size, 0, CENTER!!!!11!11111!!!!, 14, $color, $font, $text);