面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11586885
json
{
  "response": {
    "steam_id": "90286865527596038",
    "domain": null,
    "id": 11586885,
    "ip": "45.145.226.5",
    "port": 39458,
    "query": 40369,
    "project_id": null,
    "color": 0,
    "city": "Berlin",
    "description": null,
    "game": 1369670,
    "owner": null,
    "boosts": 1,
    "last_offline": 1779357382,
    "last_online": 1781218874,
    "icon": null,
    "name": "[GER] LaLa Town | Fresh Started |",
    "connect": "45.145.226.5:39458",
    "request": "45.145.226.5:40369",
    "map": null,
    "gamemode": "Unreal Test!",
    "version": "0.7.19+T2",
    "numplayers": 0,
    "maxplayers": 100,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "DE",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1779357382,
    "last_update": 1781218874,
    "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": 138,
    "language": "de",
    "parked": false,
    "app": {
      "id": 1564980,
      "steam_id": 1369670,
      "name": "Motor Town: Behind The Wheel",
      "url": "motor-town-behind-the-wheel"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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