diff --git a/src/Curl/Curl.php b/src/Curl/Curl.php index aca8ab7..a1bb042 100644 --- a/src/Curl/Curl.php +++ b/src/Curl/Curl.php @@ -309,7 +309,7 @@ class Curl if (is_file($download_filename) && $filesize = filesize($download_filename)) { $first_byte_position = $filesize; $range = $first_byte_position . '-'; - $this->setOpt(CURLOPT_RANGE, $range); + $this->setRange($range); $this->fileHandle = fopen($download_filename, 'ab'); } else { $this->fileHandle = fopen($download_filename, 'wb'); diff --git a/src/Curl/MultiCurl.php b/src/Curl/MultiCurl.php index 813370d..0df861b 100644 --- a/src/Curl/MultiCurl.php +++ b/src/Curl/MultiCurl.php @@ -102,7 +102,7 @@ class MultiCurl if (is_file($download_filename) && $filesize = filesize($download_filename)) { $first_byte_position = $filesize; $range = $first_byte_position . '-'; - $curl->setOpt(CURLOPT_RANGE, $range); + $curl->setRange($range); $curl->fileHandle = fopen($download_filename, 'ab'); // Move the downloaded temporary file to the destination save path.