Jump to content

Aysnchronous Calls


GinsBabu

Recommended Posts

Hi,

 

This a php script.I need to download a file using php code.

 

The zip file can be accessed via a http path.The size is around 400 mb+.Currently i use copy command to save the file(this file lies in another server which is accessed through eg- http://sample.com/myzip.zip) to local machine.But since its a large file the browser timeouts causing the page to output a blank page after 4-5 minutes.

 

Can i over come this with jquery using async?

 

Or can i do parallel processing using php.Please help?

 

If so could you guide me with a demo please?

 

Thanks in adv and waiting for the replyy.:)

 

Link to comment
https://forums.phpfreaks.com/topic/198980-aysnchronous-calls/
Share on other sites

at the start of the PHP script in question

 

set_time_limit(0);

 

Will allow the script to take as long as it needs.

 

http://php.net/manual/en/function.set-time-limit.php

 

If you're more sure of how long you expect the file to take, it might be worth setting a time limit that will allow it, just in case.

Link to comment
https://forums.phpfreaks.com/topic/198980-aysnchronous-calls/#findComment-1044467
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.