i'm trying to execute a request to a web service to download large files to my server. My web application is in laravel 4 and i'm using guzzle to make the request.
The problem is, after starting the file download from the remote service, i can't execute any request to my app until the download response is complete.
Here is a example of my code:
public function download($id, $url, $filename)
{
// some data for request
$request = $httpClient->get($downloadFileUrl, array(
'future' => true,
'cookies' => true,
'save_to' => $filename
)
);
return $cookieRequest;
}
In the past i use exec to start curl or wget scripts to downlaod the files to the server. But i would like to have more control over the requests and responses.
Any help would be appreciated,
Thanks