JSON pentru programe, site-uri și altele

text
https://api.gamemonitoring.ro/servers/1204658
json
{
  "response": {
    "fps": 58,
    "fps_avg": 56,
    "entities_count": 85479,
    "world_seed": 1281365347,
    "world_size": 3750,
    "steam_id": "90286604410194944",
    "domain": null,
    "id": 1204658,
    "ip": "104.143.2.125",
    "port": 28015,
    "query": 28013,
    "color": 0,
    "city": "Dallas",
    "description": "![The Clinic | PVE | Monthly | Raidable Bases | Convoy | Friendly](https://i.imgur.com/xunL6Hh.png)\n============================================================ \r\n WELCOME TO THE CLINIC! \r\n Get your daily dose of gaming medicine. \r\n ============================================================ \r\n \r\n OUR MISSION \r\n ------------------------------------------------------------ \r\n • We are a PvE-focused community. \r\n • We prioritize a friendly and inclusive environment. \r\n • Enjoy the game without fear of losing progress to other players. \r\n • Provide a self-sustaining server for all to enjoy. \r\n \r\n SERVER FEATURES \r\n ------------------------------------------------------------ \r\n • Gather Rate: 1.5x \r\n • Stacking Amount: 10x \r\n • Active Staff \r\n \r\n • Featured Plugins: \r\n Skill Tree — Customize your playstyle. \r\n Convoy — Take on dynamic missions. \r\n Raidable Bases — Raid NPC bases for rewards. \r\n Events — From Admin Events to Map Events, we got it. \r\n Abandoned Bases — Raid inactive player bases!. \r\n ...and more to discover! \r\n \r\n RULES \r\n ------------------------------------------------------------ \r\n • No killing, raiding, stealing, or abusive behavior. \r\n • Respect, kindness, and cooperation always. \r\n • Join our Discord community for giveaways & events. \r\n *Full List of Rules on Discord* \r\n \r\n AGE REQUIREMENT \r\n ------------------------------------------------------------ \r\n • This is an 18+ community. \r\n • By joining this server, you acknowledge and confirm that you are at least 18 years of age. \r\n • If you are under 18, you must disconnect immediately. \r\n \r\n ============================================================ \r\n Owner: Leroy \r\n Head Admin: Mrs. Siggy \r\n =======",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1780596861,
    "last_online": 1780627218,
    "icon": null,
    "name": "The Clinic | PVE | Monthly | Raidable Bases | Convoy | Friendly",
    "connect": "104.143.2.125:28015",
    "request": "104.143.2.125:28013",
    "map": "Procedural Map",
    "gamemode": "Survival",
    "version": "2627",
    "numplayers": 49,
    "maxplayers": 65,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "US",
    "status": true,
    "votes": 0,
    "points": 91,
    "add_date": 1691954575,
    "last_update": 1780627218,
    "banned": false,
    "wipe": 1780597265,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 229,
    "language": "en",
    "parked": false,
    "app": {
      "id": 12,
      "steam_id": 252490,
      "name": "Rust",
      "url": "rust"
    },
    "server_owner": null,
    "mods": [],
    "disabled_modules": []
  }
}

Exemple de cod

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