面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11130994
json
{
  "response": {
    "fps": 55,
    "fps_avg": 54,
    "entities_count": 179204,
    "world_seed": 1456829280,
    "world_size": 5500,
    "steam_id": "90286376606349341",
    "domain": null,
    "id": 11130994,
    "ip": "94.130.56.228",
    "port": 28015,
    "query": 28017,
    "color": 0,
    "city": "Nuremberg",
    "description": "![HORSLAND - THE ONE AND ONLY](https://images2.imgbox.com/cd/60/HEIIkbJU_o.png)\nHORSLAND - THE ONE AND ORIGINAL ... Chill low-pop, no griefing, no cheating. Fun only. 5x gather, 4x stack. Starter kits.",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780470419,
    "last_online": 1780590031,
    "icon": null,
    "name": "HORSLAND - THE ONE AND ONLY",
    "connect": "94.130.56.228:28015",
    "request": "94.130.56.228:28017",
    "map": "Procedural Map",
    "gamemode": "Vanilla",
    "version": "2625",
    "numplayers": 0,
    "maxplayers": 50,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "DE",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1770397329,
    "last_update": 1780590031,
    "banned": false,
    "wipe": 1778178923,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 4146,
    "language": "de",
    "parked": false,
    "app": {
      "id": 12,
      "steam_id": 252490,
      "name": "Rust",
      "url": "rust"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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