fork download
  1. <?php
  2.  
  3. $curl = curl_init();
  4.  
  5. CURLOPT_URL => 'https://w...content-available-to-author-only...i.fr/public_html/mphotos/i1410MAG/-large-out03.jpg',
  6. CURLOPT_RETURNTRANSFER => true,
  7. CURLOPT_ENCODING => '',
  8. CURLOPT_MAXREDIRS => 10,
  9. CURLOPT_TIMEOUT => 0,
  10. CURLOPT_FOLLOWLOCATION => true,
  11. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  12. CURLOPT_CUSTOMREQUEST => 'GET',
  13. CURLOPT_HTTPHEADER => array(
  14. 'Accept: */*',
  15. 'Accept-Encoding: gzip, deflate, br, zstd',
  16. 'Accept-language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7',
  17. 'Cache-Control: no-cache',
  18. 'Connection: keep-alive',
  19. 'Sec-Fetch-Site: none',
  20. 'Sec-Fetch-User: ?1',
  21. 'Priority: u=0, i',
  22. 'Pragma: no-cache',
  23. 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36'
  24. ),
  25. ));
  26.  
  27. $response = curl_exec($curl);
  28.  
  29. $last_http_code = $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
  30. $contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
  31.  
  32. echo $last_http_code . "<br>";
  33. echo $contentType . "<br>";
  34. if(curl_errno($curl)) {
  35. echo $last_error = curl_error($curl);
  36. }
  37.  
  38.  
  39. curl_close($curl);
  40. echo $response;
  41.  
  42. ?>
  43.  
Success #stdin #stdout 0.03s 26216KB
stdin
Standard input is empty
stdout
0<br><br>Could not resolve host: www.magsi.fr