面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/7295237
json
{
  "response": {
    "steam_id": "85568392928959248",
    "domain": null,
    "id": 7295237,
    "ip": "194.87.226.112",
    "port": 30010,
    "query": 30011,
    "color": 0,
    "city": "Moscow",
    "description": null,
    "game": 270880,
    "owner": 98165,
    "boosts": 1,
    "last_offline": 1773852723,
    "score": 0,
    "last_online": 1776014437,
    "icon": null,
    "name": "[RU] MoroZ & Co",
    "connect": "194.87.226.112:30010",
    "request": "194.87.226.112:30011",
    "map": "usa",
    "gamemode": "TRUCKERSMOROZ.RU",
    "version": null,
    "numplayers": 0,
    "maxplayers": 30,
    "bots": 0,
    "secured": false,
    "private": false,
    "country": "RU",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1736726145,
    "last_update": 1776014437,
    "banned": false,
    "wipe": null,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": null,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 19,
    "language": "ru",
    "parked": false,
    "app": {
      "id": 2949,
      "steam_id": 270880,
      "name": "American Truck Simulator",
      "url": "american-truck-simulator"
    },
    "server_owner": {
      "username": "Denis96RUS",
      "avatar": "aac099df-311d-4c18-a011-2399a1b137e5.jpg",
      "last_online": 1773248376
    },
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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