I have created a code to make it a background image with text in GD
Hope you enjoy
<? // CODE CREATED BY ALEX.PRISONER (HTTP://MYWORLDNESS.COM) [ALEX.TUNBRIDGE@HOTMAIL.COM] // header ("Content-type: image/png"); $image = "/* Background image for your text here MUST BE PNG. */"; $im = imagecreatefrompng($image); $font = "arial.ttf"; $text = $_GET['text']; //To add text to this image put yourpage.php?text= Text you want to display here. $white = imagecolorallocate($im, 255, 255, 255); //If you know RBG you can change this but if you don't you might mess with the code :P imagettftext($im, 20, 0, 20, 23, $white, $font, $text); imagepng($im); imagedestroy($im); ?>
It's always nice to have a play around with GD from time-to-time, isn't? Just a note to anybody who's using your code. You have to drag the arial.ttf font from your fonts folder to your web-root (or just link to the font file in the font folder). Also ensure that your $_GET variable text is set. Finally, ensure the background image is a PNG. You're then good to go!
Thanks for sharing! Maybe the next thing you can do is detect what file type the background is, such as JPG, GIF, et cetera...
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.