面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11649288
json
{
  "response": {
    "steam_id": "90286612350353435",
    "domain": null,
    "id": 11649288,
    "ip": "91.182.14.206",
    "port": 16261,
    "query": 16261,
    "project_id": null,
    "color": 0,
    "city": "Mons",
    "description": null,
    "game": 108600,
    "owner": null,
    "boosts": 1,
    "last_offline": 1781097212,
    "last_online": 1780616445,
    "icon": null,
    "name": "My PZ Server",
    "connect": "91.182.14.206:16261",
    "request": "91.182.14.206:16261",
    "map": "map_distanciado;Muldraugh, KY",
    "gamemode": "Project Zomboid",
    "version": "42.19",
    "numplayers": 0,
    "maxplayers": 32,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "BE",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1780177676,
    "last_update": 1781097212,
    "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": 9120,
    "language": "nl",
    "parked": false,
    "app": {
      "id": 71,
      "steam_id": 108600,
      "name": "Project Zomboid",
      "url": "project-zomboid"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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