JSON dla programów, stron i innych

text
https://api.gamemonitoring.pl/servers/11778661
json
{
  "response": {
    "steam_id": null,
    "domain": "d21.aurorix.net",
    "id": 11778661,
    "ip": "166.1.144.21",
    "port": 25641,
    "query": 25641,
    "project_id": null,
    "color": 0,
    "city": "Frankfurt am Main",
    "description": null,
    "game": 9000034,
    "owner": 200131,
    "boosts": 1,
    "last_offline": 1781108547,
    "last_online": 1781139629,
    "icon": null,
    "name": "I am... alone",
    "connect": "d21.aurorix.net:25641",
    "request": "166.1.144.21:25641",
    "map": null,
    "gamemode": null,
    "version": "1.16.5",
    "numplayers": 0,
    "maxplayers": 20,
    "bots": 0,
    "secured": null,
    "private": null,
    "country": "DE",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1781108547,
    "last_update": 1781139629,
    "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": 142,
    "language": "de",
    "parked": false,
    "app": {
      "id": 169,
      "steam_id": 9000034,
      "name": "Minecraft",
      "url": "minecraft"
    },
    "server_owner": {
      "username": "krimxsy",
      "avatar": "4da9f72c-c2f1-43c8-abba-d56d705dd322.webp"
    },
    "mods": [],
    "disabled_modules": []
  }
}

Przykłady kodu

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