<?php header("Content-type: image/png"); $string = $_GET['image']; $im = imagecreatefrompng("http://www.habboname.com/nerd/brap.png"); // white background and blue text $bg = imagecolorallocate($im, 255, 255, 250); $textcolor = imagecolorallocate($im, 0, 0, 255); // write the string at the top left imagestring($im, 5, 0, 0, "$string", $textcolor); // output the image imagepng($im); ?> PHP: Does anyone know how I can change the font? The location of the font is http://www.habboname.com/nerd/volter.ttf. Thanks, will +rep all helpful posts.
You'll need to switch to using imagettftext - http://uk2.php.net/manual/en/function.imagettftext.php If you need any help with getting it to work let us know, hopefully it will work well though.
Oh you have to be kidding me. Nevermind, I hardly know PHP and getting what I have now took me like a day. Thanks though.
It should just be a question of changing that one line 11. Like I say, if you have any problems let me know and I'll try and help. I remember doing something similar for a dynamic signature I wanted to put together a while ago.
I love gd errors, they're just so informative! I think line 11 should be something like imagettftext($im, 20, 0, 11, 21, $textcolor, "volter.ttf", $string); PHP: You also supposedly need the following at the very end after imagepng imagedestroy($im); PHP: