面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11677294
json
{
  "response": {
    "modded": true,
    "steam_id": "90286433628362756",
    "domain": null,
    "id": 11677294,
    "ip": "45.88.230.30",
    "port": 28116,
    "query": 28115,
    "color": 0,
    "city": "Canary Wharf",
    "description": "This server permit you to train you to Minicopters, Oil-Rigs, Patrol helicopter, Cargo, Millitary tunnels, arctic base, Nuclear silo, Millitary Base, Trainyard and Water treatment \r\n \r\n Quick How to use the server : \r\n - !sun permit you to put the sun back \r\n - Claim your kits with /kit after that enter in the zone you want to train using the dedicated doors \r\n - If you want to change kit, you have to empty your inventory, to do that you can just use the /clear command \r\n - If you want to train patrol helicopter, after you entered in the Patrol Heli zone, your have to do /callheli and the patrol helicopter will come to you ! \r\n -Cargo can take a few minutes to spawn if someone took it just before you log in the server. \r\n \r\n Server is made by Erwan for Rust-Pacific \r\n \r\n If you liked it, consider \r\n https://www.buymeacoffee.com/erwan_32",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780607656,
    "last_online": 1780591229,
    "icon": null,
    "name": "Oil-Rig Cargo & Rads Training",
    "connect": "45.88.230.30:28116",
    "request": "45.88.230.30:28115",
    "map": "Custom Map",
    "gamemode": "Rust",
    "version": "2625",
    "numplayers": 0,
    "maxplayers": 40,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "GB",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1780216201,
    "last_update": 1780607656,
    "banned": false,
    "wipe": 1780224508,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 12427,
    "language": "en",
    "parked": false,
    "app": {
      "id": 12,
      "steam_id": 252490,
      "name": "Rust",
      "url": "rust"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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