Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Bitcoin price
- $json_url_cmc_btc = 'https://api.coinmarketcap.com/v2/ticker/1/';
- $json_cmc_btc = json_decode( file_get_contents( $json_url_cmc_btc ) );
- $btcusd = round(($json_cmc_btc->data->quotes->USD->price),2);
- echo $btcusd;
- ?>
Add Comment
Please, Sign In to add comment