I'm trying to turn a JSON
file of Xbox Live data into variables that I can use in a PHP
generated image. My JSON file is here: http://www.xboxgamercard.org/gamercard/test3/xbox.php
I have tried this:
$request_url = 'xbox.php';
$json = file_get_contents($request_url);
$decode = json_decode($json, true);
var_dump($decode['gamertag'][0]);
but it just returns NULL
.
I would like to use the JSON as shown here:
$gamertag = $data['Gamertag'];
echo $gamertag;
You need to add the full url eg: