API dla Presov Server
JSON dla programów, stron i innych
text
json
{
"response": {
"steam_id": "90286526336107530",
"domain": null,
"id": 11534803,
"ip": "213.160.164.65",
"port": 16261,
"query": 16261,
"project_id": null,
"color": 0,
"city": "Bratislava",
"description": null,
"game": 108600,
"owner": null,
"boosts": 1,
"last_offline": 1781250784,
"last_online": 1780750313,
"icon": null,
"name": "Presov Server",
"connect": "213.160.164.65:16261",
"request": "213.160.164.65:16261",
"map": "map_distanciado;Muldraugh, KY",
"gamemode": "Project Zomboid",
"version": "42.19",
"numplayers": 0,
"maxplayers": 4,
"bots": 0,
"secured": true,
"private": true,
"country": "SK",
"status": false,
"votes": 0,
"points": 0,
"add_date": 1779355239,
"last_update": 1781250784,
"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": 7623,
"language": "sk",
"parked": false,
"app": {
"id": 71,
"steam_id": 108600,
"name": "Project Zomboid",
"url": "project-zomboid"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}Przykłady kodu
php
<?php
$json = file_get_contents("https://api.gamemonitoring.pl/servers/11534803");
$data = json_decode($json, true);
var_dump($data);