alexia 0 Report post Posted June 23, 2005 How can i create images (using php) of 128x128 by giving some types of background... and users can write text on the background... you can take example from the followinbg site:http://www.zedge.net/?side=navnelogo Share this post Link to post Share on other sites
round 0 Report post Posted June 23, 2005 I would just do the thing in flash, seems tons easier than doing it php.round Share this post Link to post Share on other sites
Raptrex 0 Report post Posted June 23, 2005 not everyone is good at flash as you arefirst you would need to know php then you can use gd to make images with phpi have a script that does something like thatill post it if i can find it Share this post Link to post Share on other sites
slu 0 Report post Posted June 24, 2005 then you can use gd to make images with php Just make sure that GD-support is enabled in the PHP you're using (it usually is, but you can always try a call to phpinfo()). Here's a small example that does what the OP is asking for: <?phpif (isset($_REQUEST['img'])) { header("Content-type: image/png"); $image = imageCreateFromPng("background.png"); $black = imageColorAllocate($image, 0, 0, 0); imageString($image, 5, 10, 10, $_REQUEST['img'], $black); imagePng($image); imageDestroy($image); exit;}?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>Add text to image</title> </head> <body> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> Text: <input name="text" type="text" value="<?=$_REQUEST['text']?>"> <input type="submit" value="OK"> </form> <br> <img src="<?=$_SERVER['PHP_SELF']?>?img=<?=$_REQUEST['text']?>"> </body></html> save the above somewhere your webserver can find it and place a png image called background.png in the same directory. For more information and examples check http://php.net/manual/en/ref.image.php Share this post Link to post Share on other sites