面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11752467
json
{
  "response": {
    "build": 103720,
    "extraFlags": 0,
    "nameHeaderRaw": "815219000002",
    "statusFlags": 0,
    "type": 2,
    "unknownStatusFlags": 0,
    "steam_id": null,
    "domain": null,
    "id": 11752467,
    "ip": "51.222.255.64",
    "port": 7042,
    "query": 7042,
    "color": 0,
    "city": "Montreal",
    "description": null,
    "game": 513710,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780519374,
    "last_online": 1780578075,
    "icon": null,
    "name": "SCUM Server Official PTE #1 - Canada",
    "connect": "51.222.255.64:7042",
    "request": "51.222.255.64:7042",
    "map": null,
    "gamemode": "official",
    "version": "1.2.0.0.103720",
    "numplayers": 0,
    "maxplayers": 64,
    "bots": 0,
    "secured": null,
    "private": false,
    "country": "CA",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1780519374,
    "last_update": 1780578075,
    "banned": false,
    "wipe": null,
    "official": true,
    "wipe_period": null,
    "next_wipe": null,
    "pve": null,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 4487,
    "language": "en",
    "parked": false,
    "app": {
      "id": 11540,
      "steam_id": 513710,
      "name": "SCUM",
      "url": "scum"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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