API dla "Valheim!"
JSON dla programów, stron i innych
text
json
{
"response": {
"steam_id": "90286603708522527",
"domain": null,
"id": 11678082,
"ip": "145.40.169.36",
"port": 2456,
"query": 2457,
"color": 0,
"city": "New Haw",
"description": null,
"game": 892970,
"owner": null,
"boosts": 1,
"last_offline": 1780595060,
"last_online": 1780631616,
"icon": null,
"name": "\"Valheim!\"",
"connect": "145.40.169.36:2456",
"request": "145.40.169.36:2457",
"map": "\"Valheim!\"",
"gamemode": null,
"version": "0.221.12",
"numplayers": 0,
"maxplayers": 10,
"bots": 0,
"secured": false,
"private": true,
"country": "GB",
"status": true,
"votes": 0,
"points": 30,
"add_date": 1780216287,
"last_update": 1780631616,
"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": 9379,
"language": "en",
"parked": false,
"app": {
"id": 34967,
"steam_id": 892970,
"name": "Valheim",
"url": "valheim"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}Przykłady kodu
php
<?php
$json = file_get_contents("https://api.gamemonitoring.pl/servers/11678082");
$data = json_decode($json, true);
var_dump($data);