面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11587738
json
{
  "response": {
    "steam_id": "90285892554904603",
    "domain": null,
    "id": 11587738,
    "ip": "45.125.47.202",
    "port": 10324,
    "query": 10328,
    "color": 0,
    "city": "Jinan",
    "description": null,
    "game": 2285150,
    "owner": null,
    "boosts": 1,
    "last_offline": 1779357480,
    "last_online": 1779500459,
    "icon": null,
    "name": "2580千倍采集千倍叠加PVP",
    "connect": "45.125.47.202:10324",
    "request": "45.125.47.202:10328",
    "map": "CooolMap",
    "gamemode": "PVP",
    "version": "1.0.0.0",
    "numplayers": 0,
    "maxplayers": 200,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "CN",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1779357480,
    "last_update": 1779500459,
    "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": 54,
    "language": "zh",
    "parked": false,
    "app": {
      "id": 1617669,
      "steam_id": 2285150,
      "name": "The Front",
      "url": "the-front"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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