Page 1 of 1
Zip timeout
Posted: Thu May 20, 2010 10:56 am
by fistuks
Hello,
It there a way to make a progress indicator for a zipping in PHP?
Re: Zip timeout
Posted: Thu May 20, 2010 11:51 am
by Chalks
It's difficult to make a progress monitor for _anything_ in php... because php is executed serverside and not clientside. Your best bet would be to make a javascript progress indicator that indicates how long something will take based on previous experience.
For instance: measure how long it takes to zip 10 files, 50 files, 100 files each 5000 times. Take the average time. Now, when a user tries to zip these files up, guess about how long it will take, and have your javascript loader-bar indicate this. Just make sure it doesn't get to 100% complete when it's not actually complete.
At least, that's how I would accomplish this.
Re: Zip timeout
Posted: Fri May 21, 2010 12:40 am
by fistuks
Thanks for the answer.
The thing is,
That sometimes i need to zip a large number of files, and by the time $zip->close() finish, i get a browser timeout.
That's why i want to keep echoing while zipping.
Any ideas?...