面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11791911
json
{
  "response": {
    "steam_id": "90286961098682396",
    "domain": null,
    "id": 11791911,
    "ip": "125.63.25.254",
    "port": 4050,
    "query": 4051,
    "project_id": null,
    "color": 0,
    "city": "Gold Coast",
    "description": null,
    "game": 107410,
    "owner": null,
    "boosts": 1,
    "last_offline": 1781427245,
    "last_online": 1781421677,
    "icon": null,
    "name": "ASOT milsim [discord.gg/asot] - Gun Range",
    "connect": "125.63.25.254:4050",
    "request": "125.63.25.254:4051",
    "map": "Stratis",
    "gamemode": "ASOT%20Gun%20Range",
    "version": "2.20.152984",
    "numplayers": 0,
    "maxplayers": 50,
    "bots": 0,
    "secured": false,
    "private": true,
    "country": "AU",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1781377325,
    "last_update": 1781427245,
    "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": 5821,
    "language": "en",
    "parked": false,
    "app": {
      "id": 61,
      "steam_id": 107410,
      "name": "Arma 3",
      "url": "arma-3"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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