面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11160146
json
{
  "response": {
    "fps": 10,
    "fps_avg": 10,
    "entities_count": 142618,
    "world_seed": 512285700,
    "world_size": 5000,
    "steam_id": "90285570024251398",
    "domain": null,
    "id": 11160146,
    "ip": "103.55.9.132",
    "port": 28015,
    "query": 28016,
    "color": 0,
    "city": "Melbourne",
    "description": "![DEMONARCHY|10x](https://imgur.com/abzCWG3.png)\n10x Component and Resources\r\nNo Workbench-InstaCraft\r\nRaidable Bases\r\n\r\nView our Website for more info and to join our Discord Channel\r\nChat is enabled between Rust and Discord!",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1778395982,
    "score": 0,
    "last_online": 1778559020,
    "icon": null,
    "name": "DEMONARCHY|10x",
    "connect": "103.55.9.132:28015",
    "request": "103.55.9.132:28016",
    "map": "Procedural Map",
    "gamemode": "Survival",
    "version": "2625",
    "numplayers": 0,
    "maxplayers": 100,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "AU",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1772228152,
    "last_update": 1778559020,
    "banned": false,
    "wipe": 1778395998,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 4252,
    "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/11160146");
$data = json_decode($json, true);
var_dump($data);