mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 04:01:47 +00:00
Add download example to README
This commit is contained in:
@@ -90,10 +90,10 @@ $curl->delete('http://api.example.com/user/', array(
|
||||
```
|
||||
|
||||
```php
|
||||
// Enable gzip compression.
|
||||
// Enable gzip compression and download a file.
|
||||
$curl = new Curl();
|
||||
$curl->setOpt(CURLOPT_ENCODING , 'gzip');
|
||||
$curl->get('https://www.example.com/image.png');
|
||||
$curl->download('https://www.example.com/image.png', '/tmp/myimage.png');
|
||||
```
|
||||
|
||||
```php
|
||||
|
||||
Reference in New Issue
Block a user