Skip to content

Commit f960ff1

Browse files
committed
Merge pull request php-curl-class#102 from zachborboa/master
Add download example to README
2 parents 99f39d1 + df49e99 commit f960ff1

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ $curl->delete('http://api.example.com/user/', array(
9090
```
9191

9292
```php
93-
// Enable gzip compression.
93+
// Enable gzip compression and download a file.
9494
$curl = new Curl();
9595
$curl->setOpt(CURLOPT_ENCODING , 'gzip');
96-
$curl->get('https://www.example.com/image.png');
96+
$curl->download('https://www.example.com/image.png', '/tmp/myimage.png');
9797
```
9898

9999
```php

examples/google_maps_geocode_address.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
use \Curl\Curl;
55

6-
76
$address = 'Paris, France';
87
$curl = new Curl();
98
$curl->get('http://maps.googleapis.com/maps/api/geocode/json', array(

examples/youtube_list_playlist_videos.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
use \Curl\Curl;
55

6-
76
define('YOUTUBE_API_KEY', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
87

98
$playlistId = 'RDHJb0VYVtaNc';

0 commit comments

Comments
 (0)