Hello,
It there a way to make a progress indicator for a zipping in PHP?
Zip timeout
Moderator: General Moderators
Re: Zip timeout
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.
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
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?...
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?...