I'm struggling to get a PDF file generated by an external server.
Here is the link to the resource : https://www.test.colisprive.com/mcadesk/Externe/ShowEtiquettePDF.aspx/etiquette_colis-23-23000000000833300-PDF_DEFAUT-N/
So as you can see, no identification needed.
I noticed that I can write anything I want at the end of the URL and it will be interpreted as a title by the browser integrated pdf reader. But when using "save as..." the name of the file is already set to a fixed value.
I tried to get it with cURL but it returns "Object moved to here."(link), Except the link doesn't work and using a CURLOPT_FOLLOWLOCATION returns false.
I really need to get to download pdf files from this URL but I'm completely stuck, any idea would be very welcome !!
Thanks, BR,
Manu
edit : I tried this :
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_HTTPHEADER => array(
),
CURLOPT_URL=>"https://www.test.colisprive.com/mcadesk/Externe/ShowEtiquettePDF.aspx/etiquette_colis-23-23000000000833300-PDF_DEFAUT-N/Etiquette_23000000000833300.pdf",
CURLOPT_RETURNTRANSFER => 1,
));
$resp = curl_exec($curl);
var_dump($resp);
curl_close($curl);