面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11645145
json
{
  "response": {
    "fps": 93,
    "fps_avg": 94,
    "entities_count": 146310,
    "world_seed": 1,
    "world_size": 5000,
    "steam_id": "90286050453886996",
    "domain": null,
    "id": 11645145,
    "ip": "50.21.76.84",
    "port": 28015,
    "query": 28017,
    "color": 0,
    "city": "Kingwood",
    "description": "![[US]Eternal Soldiers - Noob Friendly](https://drive.google.com/file/d/1OP9JGStic2cAVJVKmCffim_5yTj47P2D/view?usp=drive_link)\nServer setup for those who have a busy life.\r\nIncreased time for TC so you dont have to live farming for upkeep on your base\r\nWe have 3 added server events for you to do\r\nRaid the Admin Base, information posted and can be accessed by typing /adminraid in chat!\r\nChat commands to help you get started /adminraid /pvp /discord /rules /raid /buildingrules\r\nThanks for checking us out!",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780177448,
    "last_online": 1780650629,
    "icon": null,
    "name": "[US]Eternal Soldiers - Noob Friendly",
    "connect": "50.21.76.84:28015",
    "request": "50.21.76.84:28017",
    "map": "Procedural Map",
    "gamemode": "Vanilla",
    "version": "2625",
    "numplayers": 0,
    "maxplayers": 200,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1780177448,
    "last_update": 1780650629,
    "banned": false,
    "wipe": 1778350349,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 5426,
    "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/11645145");
$data = json_decode($json, true);
var_dump($data);