- file_get_contents: documentation ( source)
- json_decode: documentation ( source)
- print_r: documentation ( source)
- error_reporting: documentation ( source)
<?php
error_reporting(E_ALL);
# works
$json = file_get_contents('https://creativecommons.tankerkoenig.de/json/detail.php?id=fb79c457-543a-4ff6-ba70-cd270ac2110a&apikey=00000000-0000-0000-0000-000000000001&_=1440230150968');
$x = json_decode($json);
$preis_e5 = $x->station->e5;
$preis_diesel = $x->station->diesel;
echo $preis_e5;
echo $preis_diesel;
echo "<pre>";
print_r( $x );
?>