JSON dla programów, stron i innych

text
https://api.gamemonitoring.pl/servers/3273160
json
{
  "response": {
    "steam_id": null,
    "domain": null,
    "id": 3273160,
    "ip": null,
    "port": null,
    "query": null,
    "color": 0,
    "city": null,
    "description": "![public server | best admins | 24/7 help](https://img.alkad.org/images/2016/09/07/52c.png)\nPlay on the server receiving gifts from the administration! \r\n  +a store built into the server and much more! \r\n Play with pleasure!",
    "game": 252490,
    "owner": 111436,
    "boosts": 1,
    "last_offline": 1753434896,
    "last_online": 1750269022,
    "icon": null,
    "name": "Name is not set on server",
    "connect": null,
    "request": null,
    "map": "Procedural Map",
    "gamemode": "Vanilla",
    "version": null,
    "numplayers": 0,
    "maxplayers": 150,
    "bots": 0,
    "secured": false,
    "private": false,
    "country": "DE",
    "status": false,
    "votes": 0,
    "points": 0,
    "add_date": 1709803233,
    "last_update": 1753434896,
    "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": 13317,
    "language": "de",
    "parked": true,
    "app": {
      "id": 12,
      "steam_id": 252490,
      "name": "Rust",
      "url": "rust"
    },
    "server_owner": {
      "username": "sergeikamaev1",
      "avatar": "95aa9886-cb80-49e1-b678-9956f3001b7e.jpg"
    },
    "mods": [],
    "disabled_modules": []
  }
}

Przykłady kodu

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