面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11579328
json
{
  "response": {
    "steam_id": "85568392936263161",
    "domain": null,
    "id": 11579328,
    "ip": "181.2.183.9",
    "port": 7701,
    "query": 7706,
    "color": 0,
    "city": "Buenos Aires",
    "description": null,
    "game": 581320,
    "owner": null,
    "boosts": 1,
    "last_offline": 1779758002,
    "last_online": 1779780067,
    "icon": null,
    "name": "ARG Coop Server | By FU2 & SpaGnoL |",
    "connect": "181.2.183.9:7701",
    "request": "181.2.183.9:7706",
    "map": "Tell",
    "gamemode": "Checkpoint",
    "version": "1.1.0.0",
    "numplayers": 0,
    "maxplayers": 20,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "AR",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1779356962,
    "last_update": 1779780067,
    "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": 419,
    "language": "es",
    "parked": false,
    "app": {
      "id": 23489,
      "steam_id": 581320,
      "name": "Insurgency: Sandstorm",
      "url": "insurgency-sandstorm"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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