Normano 0 Report post Posted May 9, 2008 (edited) I dont know if someone already made a topic like this, however it's not hard to understand if you can php, as many know we need to start a php script with <?phpand end with ?>to make a image you need a image type, I choos .png because its much cleaner then .jpg header("Content-type: image/png");for the background for the image we need this code $image = imagecreatefrompng("http://forums.xisto.com/no_longer_exists/404.pngif we wont a text in the image we need a font color, we get our font color from HEX values $font_white = imagecolorallocate($image, 255, 255, 255);if u wont a text that can bee changes when the file is created and dont wont to open the file use this $string = $_GET["text"];then imagestring($image, 2, 12, 3, "Ice Fury", $font_white);imagestring($image, 2, 84, 3, $string, $font_white);to save space we use this code imagepng($image);imagedestroy($image);when we finnish the code should look like this <?phpheader("Content-type: image/png");$image = imagecreatefrompng("http://forums.xisto.com/no_longer_exists/404.pngpath to file "../image.php?text=hello" now is hello writed on the image Hope you like it Edited May 9, 2008 by Normano (see edit history) Share this post Link to post Share on other sites
TavoxPeru 0 Report post Posted May 11, 2008 (edited) Thanks for this simple and easy to follow code, i'm sure it would help to someone, i just test it and works fine (EDIT: It works fine only when i use an image located on my domain instead of yours.)Is it possible that the generated image includes hyperlinks with the text??? If it is true how you can do it???What kind of security problems we can get???Best regards, Edited May 11, 2008 by TavoxPeru (see edit history) Share this post Link to post Share on other sites
Normano 0 Report post Posted May 13, 2008 Thanks for this simple and easy to follow code, i'm sure it would help to someone, i just test it and works fine (EDIT: It works fine only when i use an image located on my domain instead of yours.)Is it possible that the generated image includes hyperlinks with the text??? If it is true how you can do it???What kind of security problems we can get???Best regards,You can't hyperlink generated images because its a png file, in some forums it not allowable to ahve .php generated images files, put a ".htaccess" file in the directory with this codeRewriteEngine OnRewriteRule ^([^/]*)\.png$ /path to file/gd.php?text=$1 [L]now the you can come to ur generated image with this url .../yourtext.png Share this post Link to post Share on other sites