面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11578631
json
{
  "response": {
    "steam_id": "85568392929615487",
    "domain": null,
    "id": 11578631,
    "ip": "58.242.103.135",
    "port": 49897,
    "query": 49897,
    "color": 0,
    "city": "Hefei",
    "description": null,
    "game": 304930,
    "owner": null,
    "boosts": 1,
    "last_offline": 1779701610,
    "last_online": 1779717641,
    "icon": "https://s1.img-e.com/20260514/6a04e5abc9e34.png",
    "name": "Undefined未定义服务器-加州PVE标准体验私服",
    "connect": "58.242.103.135:49897",
    "request": "58.242.103.135:49897",
    "map": "California2",
    "gamemode": "私服PVE",
    "version": "3.26.3.2",
    "numplayers": 2,
    "maxplayers": 32,
    "bots": 0,
    "secured": true,
    "private": true,
    "country": "CN",
    "status": true,
    "votes": 0,
    "points": 34,
    "add_date": 1779356926,
    "last_update": 1779717641,
    "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": 89,
    "language": "zh",
    "parked": false,
    "app": {
      "id": 48,
      "steam_id": 304930,
      "name": "Unturned",
      "url": "unturned"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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