面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11630619
json
{
  "response": {
    "steam_id": "85568392936296879",
    "domain": null,
    "id": 11630619,
    "ip": "54.39.130.214",
    "port": 26087,
    "query": 26087,
    "color": 0,
    "city": "Beauharnois",
    "description": null,
    "game": 304930,
    "owner": null,
    "boosts": 1,
    "last_offline": 1779916696,
    "last_online": 1780436444,
    "icon": "<a href=\"https://imgbb.com/\"><img src=\"https://i.ibb.co/S43j4DS7/Face-Unturned.webp\" alt=\"Face Unturned\" border=\"0\"></a>",
    "name": "Unturned Washington 24/7 Vanilla",
    "connect": "54.39.130.214:26087",
    "request": "54.39.130.214:26087",
    "map": "PEI",
    "gamemode": "100% Vanilla",
    "version": "3.26.3.2",
    "numplayers": 3,
    "maxplayers": 24,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "CA",
    "status": true,
    "votes": 0,
    "points": 38,
    "add_date": 1779916696,
    "last_update": 1780436444,
    "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": 69,
    "language": "en",
    "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/11630619");
$data = json_decode($json, true);
var_dump($data);