面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11587425
json
{
  "response": {
    "steam_id": "90286308295997448",
    "domain": null,
    "id": 11587425,
    "ip": "51.83.223.9",
    "port": 22100,
    "query": 22110,
    "color": 0,
    "city": "Warsaw",
    "description": null,
    "game": 983870,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780589614,
    "last_online": 1780002099,
    "icon": null,
    "name": "4Netplayers FOUNDRY Server Anubisian 2 (v0.6.0.26518)",
    "connect": "51.83.223.9:22100",
    "request": "51.83.223.9:22110",
    "map": "Procedural",
    "gamemode": "Foundry",
    "version": "0.6.0.26518",
    "numplayers": 0,
    "maxplayers": 4,
    "bots": 0,
    "secured": true,
    "private": true,
    "country": "PL",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1779357451,
    "last_update": 1780589614,
    "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": 221,
    "language": "pl",
    "parked": false,
    "app": {
      "id": 1516842,
      "steam_id": 983870,
      "name": "FOUNDRY",
      "url": "foundry"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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