title: Get JSON from a URL by PHP
body: <p>I have a URL that returns a JSON object like this:</p>
  
  <p>{
    "USD" : {"15m" : 7809.0, "last" : 7809.0, "buy" : 7809.85, "sell" : 7808.15, "symbol" : "$"},
    "AUD" : {"15m" : 10321.42, "last" : 10321.42, "buy" : 10322.54, "sell" : 10320.3, "symbol" : "$"},
  }</p>
  
  <p>URL : <a href="https://blockchain.info/ticker" rel="nofollow noreferrer">https://blockchain.info/ticker</a>
  more info : <a href="https://blockchain.info/api/exchange_rates_api" rel="nofollow noreferrer">https://blockchain.info/api/exchange_rates_api</a></p>
  
  <p>I want to get all the data from the first line and echo it and to have it keep requesting it so its live </p>
  
  <p>I have used the examples on git hub 
  <a href="https://github.com/blockchain/api-v1-client-php/blob/master/docs/rates.md" rel="nofollow noreferrer">https://github.com/blockchain/api-v1-client-php/blob/master/docs/rates.md</a>
  but it displays all of the data output and you have to refresh it to get it updated </p>
  
  <p>please can some one point me in the right direction</p>
  
  <p>ideally I would end up with something like 
            15 m  Last      Buy    Sell
  USD ($) 7794.87 7794.87 7795.72 7794.02</p>
  
  <p>I have the table and data going to the table but its echoing the whole data set rather than the first line and also I dont know how to select individual fields</p>
  
  <p>How can I do it through PHP?</p>