面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11393324
json
{
  "response": {
    "channels": {
      "onlinecount": 26,
      "items": [
        {
          "clients": 2,
          "id": 2,
          "items": [],
          "name": "Höllentor",
          "order": 0,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 3,
          "items": [
            {
              "clients": 0,
              "id": 4,
              "items": [],
              "name": "Brücke",
              "order": 0,
              "parent_id": 3,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 5,
              "items": [],
              "name": "Team 1",
              "order": 4,
              "parent_id": 3,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 6,
              "items": [],
              "name": "Team 2",
              "order": 5,
              "parent_id": 3,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 7,
              "items": [],
              "name": "T'Lyra's Meditationsflamme",
              "order": 6,
              "parent_id": 3,
              "topic": ""
            }
          ],
          "name": "StarTrek",
          "order": 2,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 8,
          "items": [
            {
              "clients": 0,
              "id": 9,
              "items": [],
              "name": "Raststätte Lichtendorf",
              "order": 0,
              "parent_id": 8,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 10,
              "items": [],
              "name": "on Tour 1",
              "order": 9,
              "parent_id": 8,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 11,
              "items": [],
              "name": "on Tour 2",
              "order": 10,
              "parent_id": 8,
              "topic": ""
            }
          ],
          "name": "Autobahn, Trucks & Co.",
          "order": 3,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 12,
          "items": [
            {
              "clients": 0,
              "id": 13,
              "items": [],
              "name": "Minecraft",
              "order": 0,
              "parent_id": 12,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 14,
              "items": [],
              "name": "Fallout",
              "order": 13,
              "parent_id": 12,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 15,
              "items": [
                {
                  "clients": 0,
                  "id": 16,
                  "items": [],
                  "name": "Lounge 1",
                  "order": 0,
                  "parent_id": 15,
                  "topic": ""
                },
                {
                  "clients": 0,
                  "id": 17,
                  "items": [],
                  "name": "Grind",
                  "order": 16,
                  "parent_id": 15,
                  "topic": ""
                }
              ],
              "name": "Black Desert",
              "order": 14,
              "parent_id": 12,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 18,
              "items": [],
              "name": "Lounge 1",
              "order": 15,
              "parent_id": 12,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 19,
              "items": [],
              "name": "Lounge 2",
              "order": 18,
              "parent_id": 12,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 20,
              "items": [],
              "name": "Lounge 3",
              "order": 19,
              "parent_id": 12,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 21,
              "items": [],
              "name": "Lounge 4",
              "order": 20,
              "parent_id": 12,
              "topic": ""
            }
          ],
          "name": "Anderes",
          "order": 8,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 22,
          "items": [
            {
              "clients": -1,
              "id": 23,
              "items": [],
              "name": "Privat",
              "order": 0,
              "parent_id": 22,
              "topic": ""
            }
          ],
          "name": "Destiny Lounge",
          "order": 12,
          "parent_id": 0,
          "topic": "Raum des Inhabers ! "
        },
        {
          "clients": 0,
          "id": 24,
          "items": [
            {
              "clients": 0,
              "id": 25,
              "items": [],
              "name": "Arbeiten",
              "order": 0,
              "parent_id": 24,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 26,
              "items": [],
              "name": "TV",
              "order": 25,
              "parent_id": 24,
              "topic": ""
            }
          ],
          "name": "AfK",
          "order": 22,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 27,
          "items": [],
          "name": "Downloads",
          "order": 24,
          "parent_id": 0,
          "topic": ""
        }
      ]
    },
    "external_id": "K+Y8+8ey/YRlt6qQZift4gqmW+Y=",
    "platform": "Windows",
    "created": 1270980061,
    "uptime": 598673,
    "steam_id": null,
    "domain": "ts.kriegsgoetter.de",
    "id": 11393324,
    "ip": "195.52.156.64",
    "port": 9987,
    "query": 9987,
    "color": 0,
    "city": "Berlin",
    "description": "Willkommen auf dem KriegsgoetterTeamSpeak. Habe Spaß beim Schnacken und Zocken !\nNetwork maintenance on Friday the 24th between CEST(GMT+2) 8am and 4pm may result in outages",
    "game": 9000043,
    "owner": null,
    "boosts": 1,
    "last_offline": 1776294711,
    "score": 0,
    "last_online": 1776893418,
    "icon": null,
    "name": "{KG}Kriegsgötter",
    "connect": "ts.kriegsgoetter.de:9987",
    "request": "195.52.156.64:9987",
    "map": null,
    "gamemode": null,
    "version": "3.13.7 Build: 1655727713",
    "numplayers": 3,
    "maxplayers": 20,
    "bots": 0,
    "secured": null,
    "private": true,
    "country": "DE",
    "status": true,
    "votes": 0,
    "points": 64,
    "add_date": 1774596803,
    "last_update": 1776893418,
    "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": 91,
    "language": "de",
    "parked": false,
    "app": {
      "id": 1629110,
      "steam_id": 9000043,
      "name": "Teamspeak 3",
      "url": "teamspeak-3"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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