我正在尝试将Xbox Live 数据文件转换为可在生成的图像JSON
中使用的变量。PHP
我的 JSON 文件在这里: http: //www.xboxgamercard.org/gamercard/test3/xbox.php
我试过这个:
$request_url = 'xbox.php';
$json = file_get_contents($request_url);
$decode = json_decode($json, true);
var_dump($decode['gamertag'][0]);
但它只是返回NULL
。
我想使用如下所示的 JSON:
$gamertag = $data['Gamertag'];
echo $gamertag;