mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-04 23:06:53 +00:00
Use setFile()
This commit is contained in:
+2
-2
@@ -326,7 +326,7 @@ class Curl
|
||||
};
|
||||
}
|
||||
|
||||
$this->setOpt(CURLOPT_FILE, $this->fileHandle);
|
||||
$this->setFile($this->fileHandle);
|
||||
$this->get($url);
|
||||
|
||||
return ! $this->error;
|
||||
@@ -1608,7 +1608,7 @@ class Curl
|
||||
|
||||
// Reset CURLOPT_FILE with STDOUT to avoid: "curl_exec(): CURLOPT_FILE
|
||||
// resource has gone away, resetting to default".
|
||||
$this->setOpt(CURLOPT_FILE, STDOUT);
|
||||
$this->setFile(STDOUT);
|
||||
|
||||
// Reset CURLOPT_RETURNTRANSFER to tell cURL to return subsequent
|
||||
// responses as the return value of curl_exec(). Without this,
|
||||
|
||||
@@ -122,7 +122,7 @@ class MultiCurl
|
||||
}
|
||||
}
|
||||
|
||||
$curl->setOpt(CURLOPT_FILE, $curl->fileHandle);
|
||||
$curl->setFile($curl->fileHandle);
|
||||
$curl->setOpt(CURLOPT_CUSTOMREQUEST, 'GET');
|
||||
$curl->setOpt(CURLOPT_HTTPGET, true);
|
||||
return $curl;
|
||||
|
||||
Reference in New Issue
Block a user