面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/11393072
json
{
  "response": {
    "steam_id": "90285571467624453",
    "domain": null,
    "id": 11393072,
    "ip": "82.84.108.193",
    "port": 63597,
    "query": 63599,
    "color": 0,
    "city": "Vercelli",
    "description": null,
    "game": 365960,
    "owner": null,
    "boosts": 1,
    "last_offline": 1778333584,
    "score": 0,
    "last_online": 1778441439,
    "icon": null,
    "name": "RH2026",
    "connect": "82.84.108.193:63597",
    "request": "82.84.108.193:63599",
    "map": "06 - CANADA GP 2026 - Montreal",
    "gamemode": "rFactor 2",
    "version": "11134",
    "numplayers": 1,
    "maxplayers": 32,
    "bots": 0,
    "secured": false,
    "private": true,
    "country": "IT",
    "status": true,
    "votes": 0,
    "points": 34,
    "add_date": 1774596779,
    "last_update": 1778441439,
    "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": 29,
    "language": "it",
    "parked": false,
    "app": {
      "id": 146,
      "steam_id": 365960,
      "name": "rFactor 2",
      "url": "rfactor-2"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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