Skip to content

Commit 7ff8cc3

Browse files
committed
Merge pull request php-curl-class#103 from zachborboa/master
Update README with download() and setUserAgent() examples
2 parents f960ff1 + 11e0cb4 commit 7ff8cc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ $curl->download('https://www.example.com/image.png', '/tmp/myimage.png');
9999
```php
100100
// Case-insensitive access to headers.
101101
$curl = new Curl();
102-
$curl->get('https://www.example.com/image.png');
102+
$curl->download('https://www.example.com/image.png', '/tmp/myimage.png');
103103
echo $curl->response_headers['Content-Type'] . "\n"; // image/png
104104
echo $curl->response_headers['CoNTeNT-TyPE'] . "\n"; // image/png
105105
```
@@ -117,7 +117,7 @@ curl_close($curl->curl);
117117
```php
118118
// Requests in parallel with callback functions.
119119
$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');
121121

122122
$curl->success(function($instance) {
123123
echo 'call to "' . $instance->url . '" was successful. response was' . "\n";

0 commit comments

Comments
 (0)