Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. $url = "http://api.coindesk.com/v1/bpi/currentprice/USD.json";
  2. $price = json_decode(file_get_contents($url));
  3. print $price->{'rate_float'};
  4.  
  5. ----------
  6.  
  7. $url = "http://api.coindesk.com/v1/bpi/currentprice/USD.json";
  8. $price = json_decode(file_get_contents($url));
  9. $last_price = $price['rate_float'];
  10. echo $last_price;
  11.  
  12.  
  13. -------------
  14.  
  15. $url = "http://api.coindesk.com/v1/bpi/currentprice/USD.json";
  16. $price = json_decode(file_get_contents($url),true);
  17. $last_price = $price['rate_float'];
  18. echo $last_price;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement