面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11305846
json
{
  "response": {
    "fps": 60,
    "fps_avg": 60,
    "entities_count": 18038,
    "world_seed": 55531,
    "world_size": 2000,
    "steam_id": 90286425393090580,
    "domain": null,
    "id": 11305846,
    "ip": "66.51.99.66",
    "port": 28025,
    "query": 28026,
    "color": 0,
    "city": "Dallas",
    "description": "![Starlight's Revenge | US | Monthly](https://cdn.discordapp.com/attachments/867568420119117834/1484244619477778472/starlightsrevengemainserver.jpg?ex=69bd8605&is=69bc3485&hm=ad23af3e004ddc4a039d9313fe4a0706e7b808da1696847cb7c29aba5a390a32&)\nServer Restart 1am  est.  \r\n Map Wipe: @forced\r\n Blueprint Wipe: None Scheduled\r\n\r\nServer wipe is first Thursday of month 2pm est.",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780193632,
    "last_online": 1780560628,
    "icon": null,
    "name": "My Untitled Rust Server",
    "connect": "66.51.99.66:28025",
    "request": "66.51.99.66:28026",
    "map": "Procedural Map",
    "gamemode": "Survival",
    "version": "2625",
    "numplayers": 0,
    "maxplayers": 50,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1774592903,
    "last_update": 1780560628,
    "banned": false,
    "wipe": 1780193663,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 4501,
    "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/11305846");
$data = json_decode($json, true);
var_dump($data);