API dla CETRACRAFT (Анархия, RPG, PVP, Игры, Гриф) Старт: 03.04.24 Discord: dsc.gg/mcetra [1.9-1.20.x]
JSON dla programów, stron i innych
text
json
{
"response": {
"steam_id": null,
"domain": "pl.waffcarui.ru",
"id": 10414749,
"ip": "143.20.155.26",
"port": 25565,
"query": 25565,
"color": 0,
"city": "Warsaw",
"description": null,
"game": 9000034,
"owner": null,
"boosts": 1,
"last_offline": 1773503549,
"last_online": 1780635140,
"icon": null,
"name": "CETRACRAFT (Анархия, RPG, PVP, Игры, Гриф) Старт: 03.04.24 Discord: dsc.gg/mcetra [1.9-1.20.x]",
"connect": "pl.waffcarui.ru:25565",
"request": "143.20.155.26:25565",
"map": null,
"gamemode": "FML",
"version": "1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.10, 1.10.1, 1.10.2, 1.11, 1.11.1, 1.11.2, 1.12, 1.12.1, 1.12.2, 1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1,",
"numplayers": 0,
"maxplayers": 300,
"bots": 0,
"secured": null,
"private": null,
"country": "PL",
"status": true,
"votes": 0,
"points": 30,
"add_date": 1759824708,
"last_update": 1780635140,
"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": 3224,
"language": "pl",
"parked": false,
"app": {
"id": 169,
"steam_id": 9000034,
"name": "Minecraft",
"url": "minecraft"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}Przykłady kodu
php
<?php
$json = file_get_contents("https://api.gamemonitoring.pl/servers/10414749");
$data = json_decode($json, true);
var_dump($data);