here is the JSON file in question. I need to get the last y value from the values array. This updates once a day so the code below is what I've tried, but won't update to the latest value:
<?php
$url = 'https://api.blockchain.info/charts/avg-block-size?format=json';
$data = file_get_contents($url);
$stats = json_decode($data, true);
$blocksize = $stats['values']['363']['y'];
echo $blocksize;
?>
thoughts?