Re: Zipping on the fly
| From: | André Medeiros | Date: | Wed, 29 Jun 2005 18:45:53 +0000 |
| Subject: | Re: Zipping on the fly | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217844@lists.php.net to get a copy of this message | ||
On Wed, 2005-06-29 at 13:28 -0400, Jack Jackson wrote:
> hi,
> I'm providing a download script which lets trusted users view a
> directory and select a file to download; I don't want to store the files
> zipped on the server. Is there a fast, built-in way to zip the selected
> file on the fly and let the user download the zipped copy? I looked at
> php.net/zip and didn't see any...
>
> Thanks in advance
>
I would create a temporary file and zip it using the exec() function.
IIRC, PHP has functions to generate temporary file names.
Good luck.
A;