I am trying to download a file from a remote server which takes approximately 20 minutes to through an output which is a pdf file of 20-30MB.
$CurlConnect = curl_init();
curl_setopt($CurlConnect, CURLOPT_URL, $url);
curl_setopt($CurlConnect, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($CurlConnect, CURLOPT_TIMEOUT, 1800 );
$Result = curl_exec($CurlConnect);
Above is the code I am trying to use. This code runs endlessly if not given a timeout and gets back nothing if given a timeout.
Here is an example of the test link that generates the pdf.
$url = 'http://13.94.243.89:1245/LEH/ApplyConfigurationAndRetrieveSheets?data={%22id_woningtype%22:%22Type%20B%22,%20%22id_kopwoning%22:%22id_kopwoning_rechts%22,%20%22id_blok%22:%22id_blok_4%22,%20%22id_gespiegeld%22:%22id_nee%22,%20%22id_dakbeglazing_vooraan%22:%22id_dakkapel%22,%20%22id_uitbouw%22:%22id_ja%22,%20%22id_achtergevel%22:%22id_dubbele_deuren_met_zijlicht%22,%20%22id_dakbeglazing_achteraan%22:%22id_dakkapel%22,%20%22id_indeling_begane_grond%22:%22id_gesloten_keuken%22,%20%22id_toilet_begane_grond%22:%22id_casco%22,%20%22id_indeling_eerste_verdieping%22:%22id_standaard%22,%20%22id_badkamer_eerste_verdieping%22:%22id_standaard%22,%20%22id_indeling_tweede_verdieping%22:%22id_standaard%22,%20%22id_zicht%22:%22id_3d%22}&hash=4204d5d2-f93b-5e18-919a-07ad3e4e1304&bouwnummer=21&koper=Ritesh%20new';
Here there is parameter called "hash" that you will need to change or else you will get a cached copy which is much faster since it sends over the generated pdf. Please make sure you change the hash and then try the link.
When its a cached copy, I get it in a minute and when its not a cached copy, it takes approx 20 minutes.