JSON dla programów, stron i innych

text
https://api.gamemonitoring.pl/servers/11669151
json
{
  "response": {
    "steam_id": "90286741834685465",
    "domain": null,
    "id": 11669151,
    "ip": "202.189.8.109",
    "port": 20061,
    "query": 20061,
    "project_id": null,
    "color": 0,
    "city": "Beijing",
    "description": "生活第一,游戏第二。",
    "game": 108600,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780730059,
    "last_online": 1780945838,
    "icon": null,
    "name": "毛毛裤先森",
    "connect": "202.189.8.109:20061",
    "request": "202.189.8.109:20061",
    "map": "Daisy County;Yanghu Town;Trelai",
    "gamemode": "Project Zomboid",
    "version": "42.19",
    "numplayers": 0,
    "maxplayers": 26,
    "bots": 0,
    "secured": true,
    "private": true,
    "country": "CN",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1780180380,
    "last_update": 1780945838,
    "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": 2854,
    "language": "zh",
    "parked": false,
    "app": {
      "id": 71,
      "steam_id": 108600,
      "name": "Project Zomboid",
      "url": "project-zomboid"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

Przykłady kodu

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