面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/3387863
json
{
  "response": {
    "fps": 86,
    "fps_avg": 88,
    "entities_count": 123687,
    "world_seed": 9512453,
    "world_size": 4500,
    "steam_id": "90286577033721869",
    "domain": null,
    "id": 3387863,
    "ip": "198.244.177.77",
    "port": 28017,
    "query": 28018,
    "color": 0,
    "city": "London",
    "description": "This is an official development test server owned and operated by Facepunch. Testing may interrupt gameplay and progress could be lost at any time.\r\n\r\nPeople are free to speak whatever language they like. Don't be surprised if you get banned for being abusive.",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780538665,
    "last_online": 1780570830,
    "icon": null,
    "name": "Facepunch Release",
    "connect": "198.244.177.77:28017",
    "request": "198.244.177.77:28018",
    "map": "Procedural Map",
    "gamemode": "Survival",
    "version": "2627",
    "numplayers": 0,
    "maxplayers": 500,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "GB",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1710347272,
    "last_update": 1780570830,
    "banned": false,
    "wipe": 1780399464,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 2530,
    "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/3387863");
$data = json_decode($json, true);
var_dump($data);