面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/3824061
json
{
  "response": {
    "fps": 46,
    "fps_avg": 54,
    "entities_count": 170777,
    "world_seed": 1539321495,
    "world_size": 5500,
    "steam_id": "90286379880526868",
    "domain": null,
    "id": 3824061,
    "ip": "157.90.90.95",
    "port": 28130,
    "query": 28131,
    "color": 0,
    "city": "Falkenstein",
    "description": "Welcome to The Land of Milk and Honey! \r\n Beginner Friendly \r\n Rules: \r\n Group Size 2 Max \r\n NO Cheating \r\n Mods: \r\n Auto Barrel Loot \r\n Vehicle Locks \r\n Watercatcher Boost \r\n WorkBench Area \r\n Longer Upkeep \r\n 3x Wood \r\n Enjoy and relax :-)",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780092815,
    "last_online": 1780574430,
    "icon": null,
    "name": "[EU] Land of Milk and Honey | 1.5x | Solo / Duo | Beginner Frie",
    "connect": "157.90.90.95:28130",
    "request": "157.90.90.95:28131",
    "map": "Procedural Map",
    "gamemode": "Vanilla",
    "version": "2625",
    "numplayers": 1,
    "maxplayers": 50,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "DE",
    "status": true,
    "votes": 0,
    "points": 61,
    "add_date": 1713048706,
    "last_update": 1780574430,
    "banned": false,
    "wipe": 1779893936,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 1515,
    "language": "de",
    "parked": false,
    "app": {
      "id": 252490,
      "steam_id": 252490,
      "name": "Rust",
      "url": "rust"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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