面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/9096351
json
{
  "response": {
    "steam_id": null,
    "domain": null,
    "id": 9096351,
    "ip": "37.27.238.131",
    "port": 28018,
    "query": 28020,
    "color": 0,
    "city": "Helsinki",
    "description": "![BURNHOLD.COM SOLO ONLY|3x|LOOT+|  3/4](https://burnhold.com/static/img/server-banner-solo.png)\nWWW.BURNHOLD.COM\n\nModded server for those who are looking for great time.\n\nServer rules:\n- No cheating\n- No racism or harassment\n- No exploiting of game or plugin bugs\n- Be friendly and have a good time\n\nLinks:\nDiscord: burnhold.com/discord\nWebsite: www.burnhold.com\n\nWipe Schedule:\nMap Wipe: Every week on Saturdays at 10:00 UTC\nBlueprint Wipe: On force wipes\nOn force wipes the times may vary.\nLast wipe was on 3/4.",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1776379377,
    "score": 5,
    "last_online": 1775564419,
    "icon": null,
    "name": null,
    "connect": null,
    "request": "37.27.238.131:28020",
    "map": null,
    "gamemode": null,
    "version": null,
    "numplayers": 0,
    "maxplayers": 150,
    "bots": 0,
    "secured": null,
    "private": false,
    "country": "FI",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1747132094,
    "last_update": 1776379377,
    "banned": false,
    "wipe": null,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 8669,
    "language": "fi",
    "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/9096351");
$data = json_decode($json, true);
var_dump($data);