面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11166918
json
{
  "response": {
    "steam_id": "90281537931103243",
    "domain": null,
    "id": 11166918,
    "ip": "51.81.49.60",
    "port": 6285,
    "query": 6286,
    "project_id": null,
    "color": 0,
    "city": "Reston",
    "description": null,
    "game": 1604030,
    "owner": null,
    "boosts": 1,
    "last_offline": 1772228643,
    "last_online": 1781260281,
    "icon": null,
    "name": "GooLagoon",
    "connect": "51.81.49.60:6285",
    "request": "51.81.49.60:6286",
    "map": "VRisingWorld",
    "gamemode": "3152db4d-299a-45f5-b905-120914770ae2",
    "version": "0.0.0.1",
    "numplayers": 0,
    "maxplayers": 10,
    "bots": 0,
    "secured": true,
    "private": true,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1772228643,
    "last_update": 1781260281,
    "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": 1392,
    "language": "en",
    "parked": false,
    "app": {
      "id": 55075,
      "steam_id": 1604030,
      "name": "V Rising",
      "url": "v-rising"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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