use CURL with HTTP_RANGE header

6 thoughts on “use CURL with HTTP_RANGE header”

  1. It is not working …. 🙁
    it is returning me the whole html file instead of the range of bytes. my code is as follows,

    $curl = curl_init();
    curl_setopt($curl, CURLOPT_USERAGENT, $useragent); // For Setting the Use Agent…….

    curl_setopt ($curl, CURLOPT_URL, $strURL );
    curl_setopt($curl, CURLOPT_RANGE, “0-99”);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

  2. check that you dont have any spaces or crap in the url – you may have to URL encode it

    If the URL is invalid, you may be getting the html for an error page or some other redirect.

Leave a Reply

Your email address will not be published. Required fields are marked *