面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/9785457
json
{
  "response": {
    "steam_id": null,
    "domain": null,
    "id": 9785457,
    "ip": null,
    "port": null,
    "query": null,
    "project_id": null,
    "color": 0,
    "city": null,
    "description": "[{\"id\":\"jnesmlg78\",\"type\":\"paragraph\",\"data\":{\"text\":\"Добро пожаловать на Ferox Rust \\n\\n Лимит игроков в команде:5 \\n\\n Вайпы: пятница в 7:00 по МСК \\n\\n Информация о сервере: \\n\\n - Ресурсы X2| Компоненты X2 \\n\\n Магазин: feroxrust-shop.survivalshop.org \\n\\n Discord: https://discord.gg/bwz73RsYJK\"}},{\"id\":\"7yJYfHbV8A\",\"type\":\"image\",\"data\":{\"caption\":\"\",\"withBorder\":false,\"withBackground\":false,\"stretched\":false,\"file\":{\"url\":\"https://cdn.gamemonitoring.net/images/content/98142401-c3c2-44d4-95d8-01fd4158b89b.png\"}}}]",
    "game": 252490,
    "owner": 73107,
    "boosts": 1,
    "last_offline": 1756334623,
    "last_online": 1753273224,
    "icon": null,
    "name": "FEROX RUST X2|MAX 5|TP|KIT|SHOP|",
    "connect": null,
    "request": null,
    "map": "Procedural Map",
    "gamemode": "Survival",
    "version": null,
    "numplayers": 0,
    "maxplayers": 80,
    "bots": 0,
    "secured": false,
    "private": false,
    "country": "RU",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1752681005,
    "last_update": 1756334623,
    "banned": false,
    "wipe": null,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": true,
    "hide_address": false,
    "hide_query": false,
    "position_game": 12400,
    "language": "ru",
    "parked": true,
    "app": {
      "id": 12,
      "steam_id": 252490,
      "name": "Rust",
      "url": "rust"
    },
    "server_owner": {
      "username": "stolbit",
      "avatar": "52087f46-64a7-4eec-967a-77c3c05af2cd.jpg"
    },
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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