File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ $curl->download('https://www.example.com/image.png', '/tmp/myimage.png');
99
99
``` php
100
100
// Case-insensitive access to headers.
101
101
$curl = new Curl();
102
- $curl->get ('https://www.example.com/image.png');
102
+ $curl->download ('https://www.example.com/image.png', '/tmp/myimage .png');
103
103
echo $curl->response_headers['Content-Type'] . "\n"; // image/png
104
104
echo $curl->response_headers['CoNTeNT-TyPE'] . "\n"; // image/png
105
105
```
@@ -117,7 +117,7 @@ curl_close($curl->curl);
117
117
``` php
118
118
// Requests in parallel with callback functions.
119
119
$curl = new Curl();
120
- $curl->setOpt(CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1');
120
+ $curl->setUserAgent( 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1');
121
121
122
122
$curl->success(function($instance) {
123
123
echo 'call to "' . $instance->url . '" was successful. response was' . "\n";
You can’t perform that action at this time.
0 commit comments