面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11545014
json
{
  "response": {
    "steam_id": 85568392936208160,
    "domain": null,
    "id": 11545014,
    "ip": "149.28.119.160",
    "port": 27015,
    "query": 27015,
    "project_id": null,
    "color": 0,
    "city": "Elk Grove Village",
    "description": null,
    "game": 440,
    "owner": null,
    "boosts": 1,
    "last_offline": 1781255576,
    "last_online": 1781441494,
    "icon": null,
    "name": "[US/Chicago] tf.arkabots.net - 24/7 2fort - No Random Crits",
    "connect": "149.28.119.160:27015",
    "request": "149.28.119.160:27015",
    "map": "ctf_2fort",
    "gamemode": "Team Fortress",
    "version": "10682184",
    "numplayers": 0,
    "maxplayers": 24,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1779355562,
    "last_update": 1781441494,
    "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": 1602,
    "language": "en",
    "parked": false,
    "app": {
      "id": 24,
      "steam_id": 440,
      "name": "Team Fortress 2",
      "url": "team-fortress-2"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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