面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/1027591
json
{
  "response": {
    "fps": 38,
    "fps_avg": 41,
    "entities_count": 91540,
    "world_seed": 260416,
    "world_size": 3700,
    "steam_id": "90284811948897292",
    "domain": null,
    "id": 1027591,
    "ip": "129.232.152.114",
    "port": 10010,
    "query": 10020,
    "color": 0,
    "city": "Cape Town",
    "description": "![Table Mountain Rust PVP 5x](https://i.postimg.cc/Hkghxhfz/TMR-thunder-small.png)\nThis server has kits, backpacks, NPCs and a few other things. Resource gather rates are about 5x, stack sizes are 25x.\r\nCurrently it's quite low-pop, so feel free to come and explore.\r\n\r\nSome basic rules:\r\n1) Don't be a jerk.\r\n2) No blasphemy, profanity, etc.\r\n3) No racial slurs or the like.\r\n4) Don't run around naked. If necessary, there can be kits to give free clothing.\r\n5) Do not fence off monuments such as the Mining Quarries. They are for everyone, not just you.\r\n6) Do not put auto-turrets on bases near the spawning beaches. It's not fair to new players.\r\n7) Have fun, and don't spoil other players' fun.\r\n\r\nWipe is twice a month.\r\nDiscord channel:  https://discord.gg/HBt8wwKDgQ",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1776690206,
    "score": null,
    "last_online": 1776878420,
    "icon": null,
    "name": "Table Mountain Rust PVP 5x",
    "connect": "129.232.152.114:10010",
    "request": "129.232.152.114:10020",
    "map": "Procedural Map",
    "gamemode": "Survival",
    "version": "2623",
    "numplayers": 2,
    "maxplayers": 60,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "ZA",
    "status": true,
    "votes": 0,
    "points": 62,
    "add_date": 1685372755,
    "last_update": 1776878420,
    "banned": false,
    "wipe": 1776364047,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 1963,
    "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/1027591");
$data = json_decode($json, true);
var_dump($data);