I have written a little bit of code to return the value "lastPrice" from the json provided by http://csc.blockexp.info/ext/summary, but it is returning the value as 8.503E-5 instead of the desired lastPrice.
{"data":[{"difficulty":159.63461978,"supply":33494475.4445624,"hashrate":"11.2889","lastPrice":0.00008503,"connections":24,"blockcount":1136720}]}
$jsonCSC = file_get_contents('http://csc.blockexp.info/ext/summary');
$dataCSC = json_decode($jsonCSC,true);
print_r($dataCSC);
$priceCSC = $dataCSC["data"][0]["lastPrice"];
the array prints like so:
Array ( [data] => Array ( [0] => Array ( [difficulty] => 110.1356266 [supply] => 33494245.423562 [hashrate] => 10.5306 [lastPrice] => 8.503E-5 [connections] => 24 [blockcount] => 1136696 ) ) )
As you can see lastPrice is not the last price from the file_get_contents link. I have no idea where the E-5 is coming from and why the value is being returned as 8.503 instead of the floating value any insight would be appreciated.
@enkrates pointed out that is is completely valid as a float with E-5!