面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11750691
json
{
  "response": {
    "steam_id": null,
    "domain": "play.ecomc.us",
    "id": 11750691,
    "ip": "192.135.112.24",
    "port": 25565,
    "query": 25565,
    "color": 0,
    "city": "Manassas",
    "description": null,
    "game": 9000034,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780519129,
    "last_online": 1780548174,
    "icon": null,
    "name": "==========[ EcoMC Towny Server ]========== Towny ; Economy ; EcoTech ; McMMo ; Jobs (1.21.10)",
    "connect": "play.ecomc.us:25565",
    "request": "192.135.112.24:25565",
    "map": null,
    "gamemode": null,
    "version": "1.21.10",
    "numplayers": 0,
    "maxplayers": 88,
    "bots": 0,
    "secured": null,
    "private": null,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1780519129,
    "last_update": 1780548174,
    "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": 4875,
    "language": "en",
    "parked": false,
    "app": {
      "id": 169,
      "steam_id": 9000034,
      "name": "Minecraft",
      "url": "minecraft"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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