Jump to content

Viewing image from ZIP file without saving it on server?


kls1974

Recommended Posts

Hi.

 

I have an image gallery that shows 640x480 size images with the option to download a ZIP file containing 1024x768 version af the images.

 

I want to be able to click the 640x480 image to show a 1024x768 version of it which I could do by creating a new folder with the contens of the ZIP file but I really don't want to have the same images twice on the server (both in ZIP and in extracted folder) so my question is:

 

Is there any way to read and show a single file/image from the ZIP without saving it on the server using the PHP ZIP functions?

 

Or do I have to extract the file to a temp folder on the server, link to it (<IMG>)and then delete the file? If this is done in the same PHP script will the image then show in the browser or will the image be missing when the browser reads the generated HTML output?

 

Hope my question makes sense?

Come to think about it I think the solution might be to only have the extracted folder of images and then create a ZIP (temporary) of these images when someone wants to download a ZIP of the gallery? (I should be able to find some tutorial somewhere on how to do this? :) )

 

But would still like to know if the above example is possible? Then I would only have to have the ZIP file on the server and then use PHP an GD to generate temporary thumbs, 1024x768 and 640x480 versions of the images, right?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.