Jump to content

CURLOPT_RANGE


dingus

Recommended Posts

hey i'm having some trouble with curl i am writing a peace of code that will fetch a ISO off a remote server (mine) and deliver it to the user now the remote server is inside the network so i cant simple redirect the user the code i have at the moment looks something like this

 

<?php
    $range = "1-10";
    curl_setopt($ch, CURLOPT_RANGE,$range);
    $iso = curl_exec($ch);
    echo $iso;
?>

 

now the range values there are just a test im only trying to drop a few bits (no point testing with huge amounts of data)

 

problem is the code goes off with out a problem except it calls the whole iso (805meg) and tried to park it in a variable

 

now even when the problem of ram is overcome the users browser has usually timed out by the time it gets the iso data

 

so my question is this why is CURLOPT_RANGE not working i know that the server supports resumed downloads is there more to it then that or is it something else?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.