面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/10733708
json
{
  "response": {
    "channels": {
      "onlinecount": 38,
      "items": [
        {
          "clients": -1,
          "id": 642,
          "items": [],
          "name": "[spacer14]...",
          "order": 0,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 199,
          "items": [],
          "name": "[spacer11]...",
          "order": 1,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 20,
          "items": [],
          "name": "[spacer4]...",
          "order": 5,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 21,
          "items": [
            {
              "clients": 2,
              "id": 24,
              "items": [],
              "name": "ЛАНОВСКИЙ ЛЕВ",
              "order": 0,
              "parent_id": 21,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 23,
              "items": [],
              "name": "Анал-итики",
              "order": 22,
              "parent_id": 21,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 827,
              "items": [],
              "name": "PUBG",
              "order": 23,
              "parent_id": 21,
              "topic": "чисто свои старые ellcoвские"
            },
            {
              "clients": 0,
              "id": 22,
              "items": [],
              "name": "Lobby",
              "order": 24,
              "parent_id": 21,
              "topic": ""
            }
          ],
          "name": "[cspacer][#MIX]",
          "order": 20,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": -1,
          "id": 28,
          "items": [],
          "name": "[spacer5]...",
          "order": 21,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": -1,
          "id": 113,
          "items": [],
          "name": "[cspacer][Temp Channels]",
          "order": 28,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 1,
          "id": 1,
          "items": [],
          "name": "Default Channel",
          "order": 56,
          "parent_id": 0,
          "topic": "Default Channel has no topic"
        },
        {
          "clients": 0,
          "id": 56,
          "items": [],
          "name": "#white",
          "order": 60,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 849,
          "items": [],
          "name": "Тут играют не на кд (без негатива)",
          "order": 113,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 5,
          "items": [
            {
              "clients": 0,
              "id": 1136,
              "items": [],
              "name": "asd",
              "order": 0,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 156,
              "items": [],
              "name": "dead inside team",
              "order": 6,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 874,
              "items": [],
              "name": "Path of exile",
              "order": 8,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 838,
              "items": [],
              "name": "AZBAR",
              "order": 19,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 8,
              "items": [],
              "name": "#zztop",
              "order": 156,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 3,
              "id": 428,
              "items": [],
              "name": "LIONARNIYA",
              "order": 227,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": -1,
              "id": 227,
              "items": [],
              "name": "no_exit",
              "order": 253,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 19,
              "items": [],
              "name": "allGames",
              "order": 290,
              "parent_id": 5,
              "topic": "Ты недостоин! "
            },
            {
              "clients": 0,
              "id": 253,
              "items": [],
              "name": "...",
              "order": 427,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 290,
              "items": [],
              "name": "Mедресе",
              "order": 428,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 857,
              "items": [],
              "name": "PUBG (+2 v igry)",
              "order": 838,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 869,
              "items": [],
              "name": "Battlefield 6",
              "order": 857,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 427,
              "items": [],
              "name": "22",
              "order": 874,
              "parent_id": 5,
              "topic": ""
            },
            {
              "clients": 0,
              "id": 6,
              "items": [],
              "name": "oldschool",
              "order": 1136,
              "parent_id": 5,
              "topic": ""
            }
          ],
          "name": "[cspacer3][Permanently Channels]",
          "order": 199,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 937,
          "items": [],
          "name": "Буйнакск",
          "order": 560,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": -1,
          "id": 60,
          "items": [],
          "name": "Комп клуб",
          "order": 642,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 858,
          "items": [],
          "name": "С НЕГАТИВОМ",
          "order": 849,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 862,
          "items": [],
          "name": "pma only positiv ⛟",
          "order": 858,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 865,
          "items": [],
          "name": "фуллнегатив",
          "order": 862,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 560,
          "items": [],
          "name": "[spacer0]",
          "order": 865,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 966,
          "items": [],
          "name": "Lineage 2",
          "order": 937,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 967,
          "items": [],
          "name": "Dota2_lowskillparty",
          "order": 966,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 1950,
          "items": [],
          "name": "AVAR",
          "order": 967,
          "parent_id": 0,
          "topic": ""
        },
        {
          "clients": 0,
          "id": 1955,
          "items": [],
          "name": "Миша я здесь",
          "order": 1950,
          "parent_id": 0,
          "topic": ""
        }
      ]
    },
    "external_id": "BUcKQOGHbL+l5nS8LOqSWn30BMw=",
    "platform": "Linux",
    "created": 1515681196,
    "uptime": 2848155,
    "steam_id": null,
    "domain": null,
    "id": 10733708,
    "ip": "5.63.154.226",
    "port": 9987,
    "query": 9987,
    "color": 0,
    "city": "London",
    "description": "пароль:  zztop212",
    "game": 9000043,
    "owner": null,
    "boosts": 1,
    "last_offline": 1765549641,
    "score": 0,
    "last_online": 1776898214,
    "icon": null,
    "name": "zztop",
    "connect": "5.63.154.226:9987",
    "request": "5.63.154.226:9987",
    "map": null,
    "gamemode": null,
    "version": "3.13.7 Build: 1655727713",
    "numplayers": 8,
    "maxplayers": 32,
    "bots": 0,
    "secured": null,
    "private": true,
    "country": "GB",
    "status": true,
    "votes": 0,
    "points": 71,
    "add_date": 1765549641,
    "last_update": 1776898214,
    "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": 54,
    "language": "en",
    "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/10733708");
$data = json_decode($json, true);
var_dump($data);