面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11686481
json
{
  "response": {
    "fps": 47,
    "fps_avg": 48,
    "entities_count": 125252,
    "world_seed": 1337,
    "world_size": 4500,
    "steam_id": "90286379638710283",
    "domain": null,
    "id": 11686481,
    "ip": "155.94.100.245",
    "port": 28015,
    "query": 28017,
    "color": 0,
    "city": "Fairview",
    "description": "![Gray Matter Gaming Oklahoma](https://www.dropbox.com/scl/fi/zta1dmt73ev1347f0rxbh/GMGRust.png?rlkey=283tyj9toeab8cscpwntlyyym&st=pboahsfx&dl=1)\nWelcome to Gray Matter Gaming Oklahoma!\r\nWe have all of our rules posted in our Discord\r\nunder the Rust Tab. This server is Vanilla for the most part.\r\nWe do have Backpack you keep on death and a \r\nfew other plugin mainly for quality of life.",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780224646,
    "last_online": 1780555833,
    "icon": null,
    "name": "Gray Matter Gaming Oklahoma",
    "connect": "155.94.100.245:28015",
    "request": "155.94.100.245:28017",
    "map": "Custom Map",
    "gamemode": "Vanilla",
    "version": "2625",
    "numplayers": 0,
    "maxplayers": 100,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1780224646,
    "last_update": 1780555833,
    "banned": false,
    "wipe": 1778178986,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 5920,
    "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/11686481");
$data = json_decode($json, true);
var_dump($data);