fork(2) download
  1. <?php
  2.  
  3. $url = 'https://w...content-available-to-author-only...e.org/web/20070701005218/http://w...content-available-to-author-only...s.com/';
  4.  
  5.  
  6.  
  7. $ch = curl_init();
  8. $timeout = 5;
  9.  
  10. // HEADERS AND OPTIONS APPEAR TO BE A FIREFOX BROWSER REFERRED BY GOOGLE
  11. $header[] = "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5";
  12. $header[] = "Cache-Control: max-age=0";
  13. $header[] = "Connection: keep-alive";
  14. $header[] = "Keep-Alive: 300";
  15. $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7";
  16. $header[] = "Accept-Language: en-us,en;q=0.5";
  17. $header[] = "Pragma: "; // BROWSERS USUALLY LEAVE BLANK
  18.  
  19. curl_setopt( $ch, CURLOPT_URL, $url );
  20. curl_setopt( $ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6' );
  21. curl_setopt( $ch, CURLOPT_HTTPHEADER, $header );
  22. curl_setopt( $ch, CURLOPT_REFERER, 'https://www.google.com' );
  23. curl_setopt( $ch, CURLOPT_ENCODING, 'gzip,deflate' );
  24. curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE );
  25. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );
  26. curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );
  27. curl_setopt( $ch, CURLOPT_TIMEOUT, $timeout );
  28. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  29. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  30. $info = curl_getinfo($ch,CURLINFO_EFFECTIVE_URL);
  31.  
  32. $htm = curl_exec($ch);
  33.  
  34. curl_close($ch);
  35.  
  36. echo $info;
Success #stdin #stdout 0.02s 61728KB
stdin
Standard input is empty
stdout
https://w...content-available-to-author-only...e.org/web/20070701005218/http://w...content-available-to-author-only...s.com/