面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/7482729
json
{
  "response": {
    "steam_id": "90284399172235265",
    "domain": null,
    "id": 7482729,
    "ip": "194.156.91.16",
    "port": 27311,
    "query": 27312,
    "color": 0,
    "city": "Reston",
    "description": "Hosted by EZA BRIGHTSPEAR",
    "game": 418030,
    "owner": null,
    "boosts": 1,
    "last_offline": 1773368532,
    "score": 0,
    "last_online": 1776251416,
    "icon": null,
    "name": "EZALIFE",
    "connect": "194.156.91.16:27311",
    "request": "194.156.91.16:27312",
    "map": "coldmap1",
    "gamemode": "ColdGame",
    "version": "13249",
    "numplayers": 0,
    "maxplayers": 10,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1739269507,
    "last_update": 1776251416,
    "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": 50,
    "language": "en",
    "parked": false,
    "app": {
      "id": 139,
      "steam_id": 418030,
      "name": "Subsistence",
      "url": "subsistence"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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