Use setRange()

This commit is contained in:
Zach Borboa
2020-01-14 20:58:42 -08:00
parent 82c0880ab5
commit 15a6a4dd98
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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');
+1 -1
View File
@@ -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.