面向程序、网站等的 JSON

text
https://api.gamemonitoring.cn/servers/10993457
json
{
  "response": {
    "steam_id": "90283981256623133",
    "domain": null,
    "id": 10993457,
    "ip": "31.209.149.20",
    "port": 8766,
    "query": 27016,
    "color": 0,
    "city": "Reykjavik",
    "description": null,
    "game": 1326470,
    "owner": null,
    "boosts": 1,
    "last_offline": 1774615904,
    "score": 0,
    "last_online": 1776257480,
    "icon": null,
    "name": "Kadiddigera",
    "connect": "31.209.149.20:8766",
    "request": "31.209.149.20:27016",
    "map": "Hard",
    "gamemode": "Sons Of the Forest",
    "version": "0.11.3.0.0",
    "numplayers": 0,
    "maxplayers": 8,
    "bots": 0,
    "secured": false,
    "private": false,
    "country": "IS",
    "status": true,
    "votes": 0,
    "points": 30,
    "add_date": 1769904285,
    "last_update": 1776257480,
    "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": 716,
    "language": "is",
    "parked": false,
    "app": {
      "id": 1569757,
      "steam_id": 1326470,
      "name": "Sons Of The Forest",
      "url": "sons-of-the-forest"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

代码示例

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