-4
我想在我的網站上顯示API https://steamgaug.es/api/v2的一些信息。PHP JSON解碼編號
這是我當前的代碼:
$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;
我總是收到此錯誤信息:
致命錯誤語法錯誤,意想不到的 '730'(T_LNUMBER),預計標識符(T_STRING)或可變
完美,非常感謝你 – Enge