Created
April 23, 2018 09:39
-
-
Save rubensayshi/4a7e579626d816d2ed9f01dd638c63c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ch = curl_init("https://api.blocktrail.com/v1/BTC/price?api_key=MY_APIKEY"); | |
curl_setopt_array($ch, [ | |
CURLOPT_VERBOSE => true, | |
CURLOPT_CERTINFO => true, | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_FOLLOWLOCATION => true, | |
CURLOPT_SSL_VERIFYPEER => true, | |
CURLOPT_FAILONERROR => false, | |
CURLOPT_TIMEOUT => 10, | |
CURLOPT_CONNECTTIMEOUT => 10, | |
CURLOPT_HEADER => true, | |
]); | |
$result = curl_exec($ch); | |
$info = curl_getinfo($ch); | |
curl_close($ch); | |
var_dump($result); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment