diff --git a/examples/coinbase_spot_rate.php b/examples/coinbase_spot_rate.php index ea7d443..a94a56f 100644 --- a/examples/coinbase_spot_rate.php +++ b/examples/coinbase_spot_rate.php @@ -4,8 +4,9 @@ require __DIR__ . '/vendor/autoload.php'; use \Curl\Curl; $curl = new Curl(); -$curl->get('https://coinbase.com/api/v1/prices/spot_rate'); +$curl->setHeader('CB-VERSION', '2016-01-01'); +$curl->get('https://api.coinbase.com/v2/prices/spot'); echo 'The current price of bitcoin at Coinbase is ' . - '$' . $curl->response->amount . ' ' . $curl->response->currency . '.' . "\n"; + '$' . $curl->response->data->amount . ' ' . $curl->response->data->currency . '.' . "\n"; diff --git a/examples/download_file.php b/examples/download_file.php index 9bc0fe8..3cf2591 100644 --- a/examples/download_file.php +++ b/examples/download_file.php @@ -4,4 +4,4 @@ require __DIR__ . '/vendor/autoload.php'; use \Curl\Curl; $curl = new Curl(); -$curl->download('https://php.net/images/logos/php-med-trans.png', '/tmp/php-med-trans.png'); +$curl->download('https://secure.php.net/images/logos/php-med-trans.png', '/tmp/php-med-trans.png'); diff --git a/examples/download_file_with_callback.php b/examples/download_file_with_callback.php index 91f56cf..e1af778 100644 --- a/examples/download_file_with_callback.php +++ b/examples/download_file_with_callback.php @@ -4,7 +4,7 @@ require __DIR__ . '/vendor/autoload.php'; use \Curl\Curl; $curl = new Curl(); -$curl->download('https://php.net/images/logos/php-med-trans.png', function($instance, $tmpfile) { +$curl->download('https://secure.php.net/images/logos/php-med-trans.png', function($instance, $tmpfile) { $save_to_path = '/tmp/' . basename($instance->url); $fh = fopen($save_to_path, 'wb'); stream_copy_to_stream($tmpfile, $fh); diff --git a/examples/multi_curl_delete.php b/examples/multi_curl_delete.php index ad6465d..4dae6a8 100644 --- a/examples/multi_curl_delete.php +++ b/examples/multi_curl_delete.php @@ -1,7 +1,6 @@ addDownload('https://php.net/images/logos/php-med-trans.png', '/tmp/php-med-trans.png'); +$multi_curl->addDownload('https://secure.php.net/images/logos/php-med-trans.png', '/tmp/php-med-trans.png'); $multi_curl->addDownload('https://upload.wikimedia.org/wikipedia/commons/c/c1/PHP_Logo.png', '/tmp/PHP_Logo.png'); $multi_curl->start(); diff --git a/examples/multi_curl_download_with_callback.php b/examples/multi_curl_download_with_callback.php index bd05826..1aff283 100644 --- a/examples/multi_curl_download_with_callback.php +++ b/examples/multi_curl_download_with_callback.php @@ -1,7 +1,6 @@ addDownload('https://php.net/images/logos/php-med-trans.png', $callback); +$multi_curl->addDownload('https://secure.php.net/images/logos/php-med-trans.png', $callback); $multi_curl->addDownload('https://upload.wikimedia.org/wikipedia/commons/c/c1/PHP_Logo.png', $callback); $multi_curl->start(); diff --git a/examples/multi_curl_get.php b/examples/multi_curl_get.php index 6f924a6..6fd2902 100644 --- a/examples/multi_curl_get.php +++ b/examples/multi_curl_get.php @@ -1,7 +1,6 @@