面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/8410637
json
{
  "response": {
    "fps": 119,
    "fps_avg": 118,
    "entities_count": 95536,
    "world_seed": 1141138230,
    "world_size": 4000,
    "steam_id": "90286579238449155",
    "domain": null,
    "id": 8410637,
    "ip": "162.239.255.70",
    "port": 28015,
    "query": 28016,
    "color": 0,
    "city": "Warren",
    "description": "Dirty Dogs 5X\r\n \r\n \r\nDiscord now Available\r\nClick view webpage to join!\r\n \r\n \r\n Rules\r\n \r\n NO TOXICITY OR GRIEFING\r\n Normal Facepunch rules apply\r\n \r\n -Large Stacks\r\n -No Radiation\r\n -New Player Friendly\r\n -Furnace Splitter\r\n -PumpJacks\r\n -Raid Alerts\r\n -Fast Recycle\r\n -Remover Tool\r\n -5 Minute Nights\r\n -Vehicle Locks\r\n \r\nCommands:\r\n \r\n Remover Tool - /Remove\r\n Backpack - /Backpack\r\n Vehicle Locks - Look at a vehicle and type /vlock\r\n \r\nServer Reboots at 3PM EST",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780541612,
    "last_online": 1780593637,
    "icon": null,
    "name": "Dirty Dogs 5X Large Stacks No Rads",
    "connect": "162.239.255.70:28015",
    "request": "162.239.255.70:28016",
    "map": "Procedural Map",
    "gamemode": "Survival",
    "version": "2625",
    "numplayers": 0,
    "maxplayers": 35,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1743835213,
    "last_update": 1780593637,
    "banned": false,
    "wipe": 1778180053,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 3099,
    "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/8410637");
$data = json_decode($json, true);
var_dump($data);