JSON pentru programe, site-uri și altele

text
https://api.gamemonitoring.ro/servers/4131956
json
{
  "response": {
    "fps": 59,
    "fps_avg": 58,
    "entities_count": 105149,
    "world_seed": 1754826556,
    "world_size": 4000,
    "steam_id": "90286580051588116",
    "domain": null,
    "id": 4131956,
    "ip": "157.90.90.95",
    "port": 28015,
    "query": 28016,
    "color": 0,
    "city": "Falkenstein",
    "description": "![RUSTREBELS.COM (EU) | 2x | PVE | EVENTS | CHILL COMMUNITY | 7/5](https://cdn3.mapstr.gg/060d16cfb711b090ec51a2ce5b80c12f.jpg)\nWipe: Monthly on Thursday @ 20:00 CET | Last wipe: 7/5\nMap size: 4500 | BP Wipe: Monthly | Custom Events | 50% upkeep\n\nQuality of Life: AbandonedBases | ATM | AutoDoors | BackPacks | BetterChat | Blueprints are wipe safe | BuildingWorkbench | Clans | Custom crafting | Custom Items | Custom TechTree | Dynamic Monuments (including Jungle) | ExtendedRecycler | GatherRewards | HackableCrateUnlock | InstantBarrels | InstantCraft | MonumentLock | QuarryLock | Quest System | RecyclerSpeed | RemoverTool | ShippingContainers | Shop | SkillTree | SkipNight | and more\n\nCustom Events: Airfield Event | BetterNPC | BradleyDrop | Convoy | DangerousTreasures | HeliSignals | MonumentEvents | RaidableBases | RandomRaids\n\nConfiguration: Vanilla gameplay | No killing | No raiding | Cash is wipe-safe (if deposited at an ATM) | Backpacks never wipe (except for explosives-related items) | Monuments are locked to the player/group who loots, shoots, hacks a crate, or swipes a card | Stack size: 100x | NPCs can become hostile and may raid your base if you attack them or their bases | Your base becomes raidable when all authorized players are inactive for 7 days | Dynamic monuments randomize after each server restart | Twig structures can still be destroyed by other players | Collect custom items (gems), sell them in the shop, or craft new items (jewelry) | You can buy attack helicopters, Bradleys, and scientists to attack your base for excellent rewards.\n\nServer is still a work in progress",
    "game": 252490,
    "owner": null,
    "boosts": 1,
    "last_offline": 1778176987,
    "last_online": 1780590037,
    "icon": null,
    "name": "RUSTREBELS.COM (EU) | 2x | PVE | EVENTS | CHILL COMMUNITY | 7/5",
    "connect": "157.90.90.95:28015",
    "request": "157.90.90.95:28016",
    "map": "Procedural Map",
    "gamemode": "Survival",
    "version": "2625",
    "numplayers": 0,
    "maxplayers": 50,
    "bots": 0,
    "secured": true,
    "private": false,
    "country": "DE",
    "status": true,
    "votes": 0,
    "points": 60,
    "add_date": 1714770232,
    "last_update": 1780590037,
    "banned": false,
    "wipe": 1778177467,
    "official": null,
    "wipe_period": null,
    "next_wipe": null,
    "pve": 0,
    "pvp": null,
    "list_hidden": false,
    "hide_address": false,
    "hide_query": false,
    "position_game": 2804,
    "language": "de",
    "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/4131956");
$data = json_decode($json, true);
var_dump($data);