面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11219696
json
{
  "response": {
    "steam_id": 0,
    "domain": "mrp.spacelegacy.ru",
    "id": 11219696,
    "ip": "45.143.74.198",
    "port": 7777,
    "query": null,
    "color": 0,
    "city": "Iława",
    "description": null,
    "game": 700330,
    "owner": 47933,
    "boosts": 1,
    "last_offline": 1776696205,
    "score": 0,
    "last_online": 1777548625,
    "icon": null,
    "name": "[RUS] SpaceLegacy  ▶  MRP+",
    "connect": "mrp.spacelegacy.ru:7777",
    "request": null,
    "map": "Facility",
    "gamemode": "SCP: Secret Laboratory",
    "version": "14.2.6",
    "numplayers": 0,
    "maxplayers": 25,
    "bots": 0,
    "secured": false,
    "private": false,
    "country": "PL",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1772728956,
    "last_update": 1777548625,
    "banned": false,
    "wipe": null,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": null,
    "pvp": 1,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": true,
    "position_game": 9,
    "language": "ru",
    "parked": false,
    "app": {
      "id": 18576,
      "steam_id": 700330,
      "name": "SCP: Secret Laboratory",
      "url": "scp-secret-laboratory"
    },
    "server_owner": {
      "username": "z1her",
      "avatar": "327a6a35-7046-4b23-950e-6b049ce97570.jpg",
      "last_online": 1773510253
    },
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

php
<?php
$json = file_get_contents("https://api.gamemonitoring.cn/servers/11219696");
$data = json_decode($json, true);
var_dump($data);