From f72733eb69bf298c2e0fac055f48a542ade9259f Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Thu, 11 Dec 2014 22:14:04 -0800 Subject: [PATCH 1/2] Clean up --- examples/google_maps_geocode_address.php | 1 - examples/youtube_list_playlist_videos.php | 1 - 2 files changed, 2 deletions(-) diff --git a/examples/google_maps_geocode_address.php b/examples/google_maps_geocode_address.php index 406c15c..7d40f49 100644 --- a/examples/google_maps_geocode_address.php +++ b/examples/google_maps_geocode_address.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( diff --git a/examples/youtube_list_playlist_videos.php b/examples/youtube_list_playlist_videos.php index d51c896..45f781c 100644 --- a/examples/youtube_list_playlist_videos.php +++ b/examples/youtube_list_playlist_videos.php @@ -3,7 +3,6 @@ require '../src/Curl/Curl.php'; use \Curl\Curl; - define('YOUTUBE_API_KEY', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'); $playlistId = 'RDHJb0VYVtaNc'; From df49e9950c39da318ecf5baf8a1bc5df26abbf1b Mon Sep 17 00:00:00 2001 From: Zach Borboa Date: Thu, 11 Dec 2014 22:30:29 -0800 Subject: [PATCH 2/2] Add download example to README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ccb06b6..2561c86 100644 --- a/README.md +++ b/README.md @@ -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