fork download
  1. <?php
  2.  
  3. $url = 'https://0...content-available-to-author-only...r.org/sora/81172482/d3NObUFoMm54NkgrQThhbGg2V1NRUGNyY2x4cktxd0dBZjhTWlZIaWppR2NJVzBv';
  4.  
  5. $ch = curl_init($url);
  6.  
  7. CURLOPT_RETURNTRANSFER => true,
  8. CURLOPT_FOLLOWLOCATION => true,
  9. CURLOPT_HTTPHEADER => [
  10. 'Referer: https://p...content-available-to-author-only...x.com',
  11. ],
  12. CURLOPT_SSL_VERIFYPEER => true,
  13. CURLOPT_USERAGENT => 'curl/7.76.1',
  14. CURLOPT_CONNECTTIMEOUT => 10,
  15. CURLOPT_TIMEOUT => 15,
  16.  
  17. // Abort as soon as we start receiving the body
  18. CURLOPT_NOPROGRESS => false,
  19. CURLOPT_PROGRESSFUNCTION => function($ch, $dlTotal, $dlNow, $ulTotal, $ulNow) {
  20. // Once headers are done and body starts, abort
  21. if ($dlTotal > 0 || $dlNow > 0) {
  22. return 1; // Returning non-zero aborts the transfer
  23. }
  24. return 0;
  25. },
  26. ]);
  27.  
  28. curl_exec($ch);
  29.  
  30. // CURLE_ABORTED_BY_CALLBACK (42) is expected — not a real error
  31. $errno = curl_errno($ch);
  32. if ($errno && $errno !== 42) {
  33. die('cURL error (' . $errno . '): ' . curl_error($ch));
  34. }
  35.  
  36. $finalurl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
  37.  
  38.  
  39. echo $finalurl . PHP_EOL;
  40. ?>
  41.  
Success #stdin #stdout 0.03s 26240KB
stdin
Standard input is empty
stdout
cURL error (6): Could not resolve host: 0bud01ado11.sssrr.org