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
https://forums.phpfreaks.com/topic/96149-curlopt_range/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.