Tuesday, 27 August 2013

Saving a dynamically generated image

Saving a dynamically generated image

So I made a script that works the way I want it etc
It basically generates an image based on 3 $_GET variables,
Name, font, image
It's using way too much resources generating the image each time so I
decided to save the image using this code:
imagepng($userbar, md5($name.$fontv.$image));
imagedestroy($userbar);
Now I face 2 issues:
1- The file saves in the directory where image.php is, I want it to be
saved in "/i/"
2- The file doesn't have the .PNG extensions, when ever I add .PNG it just
becomes ex: "dejddf9jf9dfpng"

No comments:

Post a Comment