API для Gnarfworld 2.5
JSON для программ, сайтов и прочего
text
json
{
"response": {
"paused": false,
"season": "spring",
"secondaries": {
"1137196188": {
"id": "1137196188",
"port": 11000,
"__addr": "65.108.236.103",
"steamid": "90292223038090247"
}
},
"directory_id": "d5cfdb3ab9e4f7a5c1ed29dc015cedf4",
"steam_id": null,
"domain": null,
"id": 14599630,
"ip": "65.108.236.103",
"port": 60449,
"query": 60449,
"project_id": null,
"color": 0,
"city": "Хельсинки",
"description": null,
"game": 322330,
"owner": null,
"boosts": 1,
"last_offline": 1788554475,
"last_online": 1788696001,
"icon": null,
"name": "Gnarfworld 2.5",
"connect": "65.108.236.103:60449",
"request": "65.108.236.103:60449",
"map": null,
"gamemode": "survival",
"version": "747465",
"numplayers": 0,
"maxplayers": 6,
"bots": null,
"secured": null,
"private": true,
"country": "FI",
"status": true,
"votes": 0,
"points": 30,
"add_date": 1788554475,
"last_update": 1788696001,
"ban_reason": null,
"banned": false,
"hidden": false,
"wipe": null,
"official": null,
"wipe_period": null,
"next_wipe": null,
"pve": null,
"pvp": 0,
"list_hidden": false,
"hide_address": false,
"hide_query": false,
"position_game": 84876,
"language": "fi",
"parked": false,
"app": {
"id": 147,
"steam_id": 322330,
"name": "Don't Starve Together",
"url": "dont-starve-together"
},
"server_owner": null,
"mods": [],
"disabled_modules": [],
"map_url": null
}
}Примеры кода
php
<?php
$json = file_get_contents("https://api.gamemonitoring.ru/servers/14599630");
$data = json_decode($json, true);
var_dump($data);