【发布时间】:2017-11-14 21:40:10
【问题描述】:
我想在我的网站上显示来自 API https://steamgaug.es/api/v2 的一些信息。
这是我当前的代码:
$steamStatusJson = @file_get_contents("https://steamgaug.es/api/v2");
$steamStatus = json_decode($steamStatusJson);
$csgoStatus = $steamStatus->ISteamGameCoordinator->730->online;
$csgoplayerssearching = $steamStatus->ISteamGameCoordinator->730->stats->players_searching;
$csgoplayers = $steamStatus->ISteamGameCoordinator->730->stats->players_online;
我总是收到此错误消息:
FATAL ERROR 语法错误,意外的 '730' (T_LNUMBER),需要标识符 (T_STRING) 或变量
【问题讨论】: