mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-26 17:29:20 +00:00
Merge pull request #102 from zachborboa/master
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
|
||||
|
||||
@@ -3,7 +3,6 @@ require '../src/Curl/Curl.php';
|
||||
|
||||
use \Curl\Curl;
|
||||
|
||||
|
||||
$address = 'Paris, France';
|
||||
$curl = new Curl();
|
||||
$curl->get('http://maps.googleapis.com/maps/api/geocode/json', array(
|
||||
|
||||
@@ -3,7 +3,6 @@ require '../src/Curl/Curl.php';
|
||||
|
||||
use \Curl\Curl;
|
||||
|
||||
|
||||
define('YOUTUBE_API_KEY', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
|
||||
|
||||
$playlistId = 'RDHJb0VYVtaNc';
|
||||
|
||||
Reference in New Issue
Block a user