- file_get_contents: documentation ( source)
- var_dump: documentation ( source)
- json_decode: documentation ( source)
<?php
// Everything you enter here will be executed by our servers. Try it!
$url = "http://openexchangerates.org/api/latest.json?app_id=d4c39d762a1f47ee8917d7b5d380365c&base=EUR&symbols=EUR";
$rawData = file_get_contents($url);
if (!$rawData)
echo "null<br>";
$response = json_decode($rawData, true);
if (!isset($response["rates"]))
echo "nullnull<br>";
var_dump($response);