API для My PZ Server
JSON для программ, сайтов и прочего
text
json
{
"response": {
"steam_id": "90292652522430476",
"domain": null,
"id": 12682350,
"ip": "86.191.73.3",
"port": 16261,
"query": 16261,
"project_id": null,
"color": 0,
"city": "Глазго",
"description": null,
"game": 108600,
"boosts": 1,
"last_offline": 1789365740,
"last_online": 1789269736,
"icon": null,
"name": "My PZ Server",
"connect": "86.191.73.3:16261",
"request": "86.191.73.3:16261",
"map": "MEAZones;Muldraugh, KY",
"gamemode": "Project Zomboid",
"version": "41.78.21",
"numplayers": 0,
"maxplayers": 10,
"bots": 0,
"secured": true,
"private": false,
"country": "GB",
"status": false,
"votes": 0,
"points": 0,
"add_date": 1785026483,
"last_update": 1789365740,
"ban_reason": null,
"banned": false,
"hidden": false,
"wipe": null,
"official": null,
"wipe_period": null,
"next_wipe": null,
"pve": null,
"pvp": 1,
"list_hidden": false,
"hide_address": false,
"hide_query": false,
"position_game": 9384,
"language": "en",
"parked": false,
"app": {
"id": 71,
"steam_id": 108600,
"name": "Project Zomboid",
"url": "project-zomboid"
},
"mods": [],
"disabled_modules": [],
"map_url": null
}
}Примеры кода
php
<?php
$json = file_get_contents("https://api.gamemonitoring.ru/servers/12682350");
$data = json_decode($json, true);
var_dump($data);