面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11588490
json
{
  "response": {
    "steam_id": "90286257103522829",
    "domain": null,
    "id": 11588490,
    "ip": "69.129.201.191",
    "port": 9778,
    "query": 27017,
    "color": 0,
    "city": "Verona",
    "description": null,
    "game": 39000,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780551815,
    "last_online": 1779868272,
    "icon": null,
    "name": "Isa's Moonbase (Public)",
    "connect": "69.129.201.191:9778",
    "request": "69.129.201.191:27017",
    "map": "MBA_Sandbox",
    "gamemode": "Moonbase Alpha",
    "version": "1.1.0.0",
    "numplayers": 0,
    "maxplayers": 16,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1779357854,
    "last_update": 1780551815,
    "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": 4,
    "language": "en",
    "parked": false,
    "app": {
      "id": 90,
      "steam_id": 39000,
      "name": "Moonbase Alpha",
      "url": "moonbase-alpha"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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