public static function getinfo($id = null) { if (is_array($id)) { $id = explode(',', $id); } else { $id = $id == null ? self::$id : $id; } $json = self::query('ISteamUser', 'GetPlayerSummaries', 2, array('steamids' => $id)); if (empty($json)) { return false; } $array = json_decode($json, 1); self::$id = $id; return $array['response']['players']; }
public static function api($id = '76561197988315974') { load::library('steam_api'); steam_api::getinfo($id); echo '<img src="' . steam_api::$avatar . '"/>'; }