View difference between Paste ID: QtiNEm5a and 3mb8S625
SHOW: | | - or go back to the newest paste.
1
<?php
2
// Bitcoin price
3
$json_url_cmc_btc = 'https://api.coinmarketcap.com/v2/ticker/1/';
4
$json_cmc_btc = json_decode( file_get_contents( $json_url_cmc_btc ) );
5
$btcusd = round(($json_cmc_btc->data->quotes->USD->price),2);
6
echo $btcusd;
7
?>