From the php manual:
Your web server can have other timeout configurations that may also interrupt PHP execution. Apache has a Timeout directive and IIS has a CGI timeout function. Both default to 300 seconds. See your web server documentation for specific details.
I found mine under Configuration - apache2handler as Timeouts and it was Connection: 300 - Keep-Alive: 5
If this is the problem you might need to do a partial download and repeat it a number of times til you get everything.