API для The Ultimate Planet of Friendship
JSON для программ, сайтов и прочего
text
json
{
"response": {
"add_date": 1792502660,
"app": {
"id": 147,
"name": "Don't Starve Together",
"steam_id": 322330,
"url": "dont-starve-together"
},
"color": 0,
"connect": "135.125.188.235:5006",
"country": "DE",
"domain": null,
"game": 322330,
"hide_address": false,
"hide_query": false,
"icon": null,
"id": 18731062,
"ip": "135.125.188.235",
"language": "de",
"last_update": 1793916139,
"map": null,
"maxplayers": 10,
"name": "The Ultimate Planet of Friendship",
"numplayers": 3,
"official": null,
"points": 44,
"port": 5006,
"private": true,
"project_id": null,
"pve": null,
"pvp": 0,
"query": 5006,
"request": "135.125.188.235:5006",
"secured": null,
"status": true,
"steam_id": null,
"version": "761239",
"votes": 0,
"wipe": null,
"ban_reason": null,
"banned": false,
"boosts": 1,
"bots": 0,
"city": "Лимбург-ан-дер-Лан",
"description": null,
"disabled_modules": [],
"gamemode": "survival",
"hidden": false,
"last_offline": 1793808875,
"last_online": 1793916139,
"list_hidden": false,
"map_url": null,
"mods": [],
"next_wipe": null,
"parked": false,
"position_game": 694,
"wipe_period": null,
"paused": false,
"season": "summer",
"lanonly": false,
"dedicated": true,
"secondaries": {
"3152345452": {
"id": "3152345452",
"port": 5007,
"__addr": "135.125.188.235",
"steamid": "90296825707197463"
}
},
"clienthosted": false,
"directory_id": "KU_R-jllgma^7r64vXwR250UqE7L"
}
}Примеры кода
php
<?php
$json = file_get_contents("https://api.gamemonitoring.ru/servers/18731062");
$data = json_decode($json, true);
var_dump($data);