面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11638731
json
{
  "response": {
    "steam_id": "90286296685092881",
    "domain": null,
    "id": 11638731,
    "ip": "139.47.13.7",
    "port": 27015,
    "query": 27016,
    "color": 0,
    "city": "Valencia",
    "description": null,
    "game": 230190,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780206783,
    "last_online": 1779919971,
    "icon": null,
    "name": "S0k4r0",
    "connect": "139.47.13.7:27015",
    "request": "139.47.13.7:27016",
    "map": "mapinfo.dk2:_alcatraz.765611979",
    "gamemode": "1",
    "version": "0.1",
    "numplayers": 0,
    "maxplayers": 4,
    "bots": 0,
    "secured": false,
    "private": true,
    "country": "ES",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1779917607,
    "last_update": 1780206783,
    "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": 1,
    "language": "es",
    "parked": false,
    "app": {
      "id": 2020,
      "steam_id": 230190,
      "name": "War for the Overworld",
      "url": "war-for-the-overworld"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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