[thelist] Zip, streaming and PHP..?

Jeff Wilhelm - TheList thelist at summit7solutions.com
Fri Dec 8 15:40:50 CST 2006

We had the same problem on one of the sites we developed. It was a data /
list management site where the user would query on data and then download
the results. The result set varied from under 1MB to sometimes a few GB.
Because the files were text, compression was often 10:1, but it still took
time to compress. 

The solution we ended up with was that at the end, after "check out" the
user was told, you have requested file(s) totalling XX MB (or GB). If the
file(s) were under 100MB we knew the zip would take a second or two and
would allow the user to download immediately. If the file was larger, we
told the user they would get an email with a link to the download, and the
usually would get that anywhere from a couple of seconds to a couple of
minutes later, depending on file sizes and server usage patterns.

You may want to do something similar. Basically do some testing and see how
long certain files take to be prepared for downloading. Also ask yourself,
from the time they click the download link, what is the maximum wait we want
the user to have. We chose sub-three-seconds. Then if a file will be ready
in under three seconds just do the zip in the background and then allow the
user to download. If the file will take more than three (or whatever you
pick) seconds, then tell the user they will be emailed a link shortly.



-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Tris
Sent: Friday, December 08, 2006 12:59 PM
To: thelist at lists.evolt.org
Subject: [thelist] Zip, streaming and PHP..?

Hey all...
I've built an asset management thingy for a client.
They upload vids, psd's, audio file, whatever..

The users then broswe the archive and add the products they want to a

All works great..

They want teh user then hit a button, to get a zip file, containing their
So, I've looked up creating zips, and i seem to have it down, but my issue
is that if a user has 3-4 files of over 100Mb each, teh zip is gonna be
400Mb +...
I'd like to offer the user a download prompt imeiatly, and then stream the
zip as it's created.. or something like that...
Otehrwise the user is left waiting for the zip to be compiled before being

Has anyone done this before, or can point me in the right direction to

More info if you need it!!


* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester and archives
of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! 

More information about the thelist mailing list