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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s