Page 1 of 1

Simple PHP doubt

Posted: Sat Dec 11, 2010 12:24 pm
by jayjones01
I'm making a php script (im not that familiar with php) to download a lot of files from a server i have (to check the connection/server behaviour with a heavy workload). When i request a download, does the php script remain active till the download finishes ? or does it request the download and then ends ? I'm asking this because i want to record how long did the files take to download, and if the script ends before the files are transfered, how could i accomplish this?

Thanks in advance

Re: Simple PHP doubt

Posted: Sat Dec 11, 2010 12:26 pm
by s.dot
Unless you are forking the process, php is a linear language and the script execution will not end until the file is downloaded.

Re: Simple PHP doubt

Posted: Sat Dec 11, 2010 12:28 pm
by jayjones01
Thanks a lot, that's all i needed to know :D

Re: Simple PHP doubt

Posted: Sat Dec 11, 2010 12:29 pm
by s.dot
For curiosity, how are you doing the download?