面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11588387
json
{
  "response": {
    "steam_id": "90285740118735899",
    "domain": null,
    "id": 11588387,
    "ip": "2.243.33.185",
    "port": 27206,
    "query": 27207,
    "color": 0,
    "city": "Essen",
    "description": null,
    "game": 41070,
    "owner": null,
    "boosts": 1,
    "last_offline": 1779388972,
    "last_online": 1779363015,
    "icon": null,
    "name": "!AAH!CLAN!Server  ❗ Vote 4 DLC™",
    "connect": "2.243.33.185:27206",
    "request": "2.243.33.185:27207",
    "map": "05_CairoTown",
    "gamemode": "Serious Sam 3",
    "version": "0.1.200.142",
    "numplayers": 0,
    "maxplayers": 16,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "DE",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1779357673,
    "last_update": 1779388972,
    "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": 11,
    "language": "de",
    "parked": false,
    "app": {
      "id": 52,
      "steam_id": 41070,
      "name": "Serious Sam 3: BFE",
      "url": "serious-sam-3-bfe"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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