i've got a page with sstv (slow scan TV) digital images, 12 of these questions table..they alter because the pork operators send the sstv.. my question ..how do i set the pictures named 1.digital - 12.digital to become downloadable inside a zip file using a download link ..the zipping will have to occur server side once the download link is clicked on..is the fact that possible? ...... or.. how do i give a download link under every individual image when the complete 12 zipped up is not possible?
thank you for any help... i've attempted .htaccess to create the pictures themselves downloadable and may not get results, it broke the entire page after i did i believe because i personally use htaccess to password safeguard the website for several club people...
Zipping the files up each time someone clicks the download link would most likely be pricey when it comes to server-side processing. Should you still wish to accomplish it, I recommend writing an engaged script in similar to PHP to deal with doing the work.
However, what I recommend is writing a brief cron script (Home windows Scheduled Task if you are on the Home windows box) to periodically zip in the files to some predetermined filename and placement. For instance, an easy cron entry might seem like:
15 * * * * zip /path/to/downloadfile.zip /path/to/zip/images >/dev/nul
Use crontab -e to edit your crontab (or sudo crontab -e to edit the main crontab). Then put a hyperlink towards the downloadfile.zip to allow people download it. Yes, it's produced every fifteen minutes (you can tweak the timing) rather than when needed, but that is generally better to provide you with consistent server performance.
Should you absolutely must get it produced when needed, consider, for instance, PHP's Zip library of functions to complete the particular compression, then one like tempnam to let you save the file to some guaranteed unique temporary filename and server it for your client.