面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11742116
json
{
  "response": {
    "channels": {
      "onlinecount": 4,
      "items": [
        {
          "clients": 0,
          "id": 2,
          "items": [],
          "name": "🐱 CATS HANGOUT 🐱",
          "order": 0,
          "parent_id": 0,
          "topic": "🐱 Classmates and Cheer Lobby 🐱"
        },
        {
          "clients": 1,
          "id": 3,
          "items": [],
          "name": "📻 WILDCAT RADIO 📻",
          "order": 2,
          "parent_id": 0,
          "topic": "🎤 LIVE RADIO LINK 🎤"
        },
        {
          "clients": 2,
          "id": 4,
          "items": [],
          "name": "💤  AWAY AWAY 💤",
          "order": 3,
          "parent_id": 0,
          "topic": "-- The Quite Place --"
        },
        {
          "clients": 4,
          "id": 5,
          "items": [],
          "name": "📣 WELCOME 📣",
          "order": 4,
          "parent_id": 0,
          "topic": "Yep, You Are Here !"
        }
      ]
    },
    "external_id": "Q6r4SRqmGH7yorglznQ/02ZQUwc=",
    "platform": "Windows",
    "created": 1581424700,
    "uptime": 723683,
    "steam_id": null,
    "domain": "pahs.mywire.org",
    "id": 11742116,
    "ip": "192.228.44.42",
    "port": 9111,
    "query": 10011,
    "color": 0,
    "city": "Haleyville",
    "description": "[{\"type\":\"paragraph\",\"data\":{\"text\":\"**Cheer Chat Tuesday Nights 7:00 to 7:30 pm CST LIVE on 90.1 THE WILDCAT. **Will be Looking at the Schools ZOOM Account like We Used a few years ago for Virtual Classes during Covid. A Real Cool Possibility for Next Year !!!🧡\\n📣 **PAHS WILDCATS** 📣  🌴 WILDCATS DEN 🌴\"}}]",
    "game": 9000043,
    "owner": 140417,
    "boosts": 1,
    "last_offline": 1780428561,
    "last_online": 1780459812,
    "icon": null,
    "name": "🌴 WILDCATS DEN 🌴",
    "connect": "pahs.mywire.org:9111",
    "request": "192.228.44.42:10011",
    "map": null,
    "gamemode": null,
    "version": "3.13.7 Build: 1655727713",
    "numplayers": 7,
    "maxplayers": 10,
    "bots": 0,
    "secured": null,
    "private": true,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 123,
    "add_date": 1780428561,
    "last_update": 1780459812,
    "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": 3,
    "language": "en",
    "parked": false,
    "app": {
      "id": 1629110,
      "steam_id": 9000043,
      "name": "Teamspeak 3",
      "url": "teamspeak-3"
    },
    "server_owner": {
      "username": "2cute4u",
      "avatar": "fbf12111-588b-4b0c-8bd9-9d4f1148515e.webp"
    },
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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