面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/761108
json
{
  "response": {
    "fps": 21,
    "fps_avg": 38,
    "entities_count": 160669,
    "world_seed": 1696419466,
    "world_size": 4500,
    "steam_id": "90286263483499536",
    "domain": null,
    "id": 761108,
    "ip": "74.208.242.248",
    "port": 28015,
    "query": 28016,
    "color": 0,
    "city": "Washington",
    "description": "![RustyBallz Noob Friendly USA/East PvE LowDecay](https://imgur.com/xE8jhWm)\n*Welcome to RustyBallz East Coast USA Rust Server*\r\n\r\nThis is a friendly group, perfect for starting off and meeting others.\r\nWe build for 3.5 weeks (PvE), and then destroy until forced wipe (PvP).\r\nMap and BP wipes are monthly, and decay is reduced to 10%.\r\n\r\nPvP Week Starts: 05/30        Next Wipe: 06/04\r\nTo view the server rules, type /info at any time in game chat.",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1779842600,
    "last_online": 1780585829,
    "icon": null,
    "name": "RustyBallz Noob Friendly USA/East PvE LowDecay",
    "connect": "74.208.242.248:28015",
    "request": "74.208.242.248:28016",
    "map": "Procedural Map",
    "gamemode": "Vanilla",
    "version": "2625",
    "numplayers": 1,
    "maxplayers": 50,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 61,
    "add_date": 1680785290,
    "last_update": 1780585829,
    "banned": false,
    "wipe": 1778188246,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 1631,
    "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/761108");
$data = json_decode($json, true);
var_dump($data);