cesarcesar Posted August 10, 2007 Share Posted August 10, 2007 I have a page thats sole function is to generate a dynamic image. When the image is loaded on screen, the only code within the source code body is <img alt="my alt tag" src="http://www.my-site.com/get.php?image_id=1" /> When i right click on the image and try a "save as.." the suggested file name is *get.php.jpg*. So good so far. What i want to do is load this page in the buffer or cache, then rename and save the generated image to a designated folder on my server, instead of displaying it. Once i save the image, i will just header() to another page for display. Is there a way to do what i describe? Link to comment https://forums.phpfreaks.com/topic/64340-dynamic-image-saving/ Share on other sites More sharing options...
corbin Posted August 10, 2007 Share Posted August 10, 2007 Try looking into imagejpeg() with a second parameter. http://php.net/imagejpeg Link to comment https://forums.phpfreaks.com/topic/64340-dynamic-image-saving/#findComment-320806 Share on other sites More sharing options...
gerkintrigg Posted August 11, 2007 Share Posted August 11, 2007 you'll not be able to use the header redirect after output has been sent to the browser. Your best bet is to do something like use an include to copy the file and then if you're worried about people saving the image, watermark it like http://www.nextdaygraphics.com. Link to comment https://forums.phpfreaks.com/topic/64340-dynamic-image-saving/#findComment-320834 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.