面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11578061
json
{
  "response": {
    "steam_id": "90285864113096707",
    "domain": null,
    "id": 11578061,
    "ip": "115.129.27.91",
    "port": 27960,
    "query": 27960,
    "color": 0,
    "city": "Melbourne",
    "description": null,
    "game": 282440,
    "owner": null,
    "boosts": 1,
    "last_offline": 1779356911,
    "last_online": 1780304494,
    "icon": null,
    "name": "Standard CA",
    "connect": "115.129.27.91:27960",
    "request": "115.129.27.91:27960",
    "map": "seamsandbolts",
    "gamemode": "Clan Arena",
    "version": "1069 linux-x64 Jun  3 2016 20:53:50",
    "numplayers": 0,
    "maxplayers": 8,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "AU",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1779356911,
    "last_update": 1780304494,
    "banned": false,
    "wipe": null,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": null,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 660,
    "language": "en",
    "parked": false,
    "app": {
      "id": 138,
      "steam_id": 282440,
      "name": "Quake Live",
      "url": "quake-live"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

php
<?php
$json = file_get_contents("https://api.gamemonitoring.cn/servers/11578061");
$data = json_decode($json, true);
var_dump($data);