面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/4745003
json
{
  "response": {
    "steam_id": null,
    "domain": null,
    "id": 4745003,
    "ip": null,
    "port": null,
    "query": null,
    "color": 0,
    "city": null,
    "description": "[{\"id\":\"oTI7zZqQNh\",\"type\":\"paragraph\",\"data\":{\"text\":\"Сервер анархии 1.16.5-1.20.6 \"}},{\"id\":\"RmgYv8RpdY\",\"type\":\"linkTool\",\"data\":{\"link\":\"https://vk.com/loonatime\",\"meta\":{\"title\":\"ВКонтакте | ВКонтакте\",\"description\":null,\"image\":{\"url\":null}}}},{\"id\":\"LvfI2QGuzD\",\"type\":\"linkTool\",\"data\":{\"link\":\"https://discord.gg/loonatime\",\"meta\":{\"title\":\"𝕃𝕠𝕠𝕟𝕒𝕋𝕚𝕞𝕖\",\"description\":\"Check out the 𝕃𝕠𝕠𝕟𝕒𝕋𝕚𝕞𝕖 community on Discord - hang out with 62 other members and enjoy free voice and text chat.\",\"image\":{\"url\":\"https://cdn.discordapp.com/splashes/1246862066212405258/4e573da443e24507d005fde67a1c601a.jpg?size=512\"}}}}]",
    "game": 9000034,
    "owner": 71146,
    "boosts": 1,
    "last_offline": 1750457065,
    "last_online": 1737654031,
    "icon": null,
    "name": "A Minecraft Server",
    "connect": null,
    "request": null,
    "map": null,
    "gamemode": null,
    "version": null,
    "numplayers": 0,
    "maxplayers": 20,
    "bots": 0,
    "secured": false,
    "private": null,
    "country": "DE",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1718017866,
    "last_update": 1750457065,
    "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": 5589,
    "language": "de",
    "parked": true,
    "app": {
      "id": 169,
      "steam_id": 9000034,
      "name": "Minecraft",
      "url": "minecraft"
    },
    "server_owner": {
      "username": "Papka2017",
      "avatar": "29780527-84cc-4001-923c-a89c4dfb03b3.jpg"
    },
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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