面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11264409
json
{
  "response": {
    "steam_id": "90285562628619274",
    "domain": null,
    "id": 11264409,
    "ip": "217.160.229.28",
    "port": 22000,
    "query": 22001,
    "color": 0,
    "city": "Madrid",
    "description": null,
    "game": 892970,
    "owner": null,
    "boosts": 1,
    "last_offline": 1778638333,
    "score": 0,
    "last_online": 1778401904,
    "icon": null,
    "name": "4Netplayers-Torrejon",
    "connect": "217.160.229.28:22000",
    "request": "217.160.229.28:22001",
    "map": "4Netplayers-Torrejon",
    "gamemode": null,
    "version": "0.221.12",
    "numplayers": 0,
    "maxplayers": 10,
    "bots": 0,
    "secured": false,
    "private": true,
    "country": "ES",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1774555385,
    "last_update": 1778638333,
    "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": 7180,
    "language": "es",
    "parked": false,
    "app": {
      "id": 34967,
      "steam_id": 892970,
      "name": "Valheim",
      "url": "valheim"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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