面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11759294
json
{
  "response": {
    "fps": 122,
    "fps_avg": 140,
    "entities_count": 64622,
    "world_seed": 1836345630,
    "world_size": 3500,
    "steam_id": "90286956942022665",
    "domain": null,
    "id": 11759294,
    "ip": "46.202.135.112",
    "port": 28015,
    "query": 28016,
    "project_id": null,
    "color": 0,
    "city": "Paris",
    "description": "![Donkey.am [Donkey Land] | Solo • 50% • Tugboats • Minis](https://donkey.am/asset/banner/banner-v2.0-1024x512.jpg)\nMonthly wipe • Solo only • ~50% upkeep • Tugboats enabled • Minis on roads\r\n\r\nWelcome to Donkey Land!\r\nOur donkey runs the server – poorly, but with enthusiasm.\r\n\r\nRules:\r\nNo cheating, no toxicity, solo only (no teams, no alliances).\r\n\r\nAdmins:\r\nWe watch, we bray when needed.\r\nWe don't play, but we might crack a joke.\r\n\r\nContact: [email protected] | discord.donkey.am\r\n\r\nIf it breaks, the donkey absolutely did it.",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1781292184,
    "last_online": 1781354435,
    "icon": null,
    "name": "Donkey.am [Donkey Land] | Solo • 50% • Tugboats • Minis",
    "connect": "46.202.135.112:28015",
    "request": "46.202.135.112:28016",
    "map": "Procedural Map",
    "gamemode": "Survival",
    "version": "2627",
    "numplayers": 0,
    "maxplayers": 50,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "FR",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1780931707,
    "last_update": 1781354435,
    "banned": false,
    "wipe": 1781292398,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 3034,
    "language": "fr",
    "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/11759294");
$data = json_decode($json, true);
var_dump($data);