面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/10796439
json
{
  "response": {
    "steam_id": "90284391167807504",
    "domain": null,
    "id": 10796439,
    "ip": "63.143.56.131",
    "port": 7000,
    "query": 21015,
    "color": 0,
    "city": "Chicago",
    "description": null,
    "game": 219640,
    "owner": null,
    "boosts": 1,
    "last_offline": 1774562534,
    "score": 0,
    "last_online": 1776436885,
    "icon": null,
    "name": "Bald's Reach",
    "connect": "63.143.56.131:7000",
    "request": "63.143.56.131:21015",
    "map": "aocffa-arena3_p",
    "gamemode": "Chivalry: Medieval Warfare",
    "version": "1.0.0.1",
    "numplayers": 0,
    "maxplayers": 32,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1766877200,
    "last_update": 1776436885,
    "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": 16,
    "language": "en",
    "parked": false,
    "app": {
      "id": 79,
      "steam_id": 219640,
      "name": "Chivalry: Medieval Warfare",
      "url": "chivalry-medieval-warfare"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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