面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/5819646
json
{
  "response": {
    "steam_id": null,
    "domain": null,
    "id": 5819646,
    "ip": null,
    "port": null,
    "query": null,
    "color": 0,
    "city": null,
    "description": "[{\"id\":\"1tajiftpl\",\"type\":\"image\",\"data\":{\"caption\":\"(RU)PAY TO WIN|Nolimit|Anti-DDOS|FPS+\",\"withBorder\":false,\"withBackground\":false,\"stretched\":true,\"file\":{\"url\":\"https://pic.survivalhost.org/images/2024/08/31/RUST_Screenshot_2024.07.03_-_01.25.30.77.png\"}}},{\"id\":\"y20w4mxh1\",\"type\":\"paragraph\",\"data\":{\"text\":\"Наш сервер стоит на самом лучшем оборудовании\\n\\n Защита от DDOS \\n\\n Самая настоящая Vanilla\\n\\n Wipe раз в месяц\\nWipe изучений раз в месяц\"}}]",
    "game": 252490,
    "owner": 82452,
    "boosts": 1,
    "last_offline": 1750457066,
    "score": 5,
    "last_online": 1746316227,
    "icon": null,
    "name": "Twilight Sanctuary Rust",
    "connect": null,
    "request": null,
    "map": "Custom Map",
    "gamemode": "Vanilla",
    "version": null,
    "numplayers": 0,
    "maxplayers": 200,
    "bots": 0,
    "secured": false,
    "private": false,
    "country": "RU",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1725101465,
    "last_update": 1750457066,
    "banned": false,
    "wipe": 1746282331,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": null,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 6650,
    "language": "ru",
    "parked": true,
    "app": {
      "id": 12,
      "steam_id": 252490,
      "name": "Rust",
      "url": "rust"
    },
    "server_owner": {
      "username": "GUSTAVA009",
      "avatar": "1285440b-67c2-4a64-8d11-2a595d5a20d0.jpg",
      "last_online": 1757015170
    },
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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