API dla ValheimPrime
JSON dla programów, stron i innych
text
json
{
"response": {
"steam_id": "90286612119341079",
"domain": null,
"id": 11678176,
"ip": "148.113.152.61",
"port": 20520,
"query": 20521,
"project_id": null,
"color": 0,
"city": "Montreal",
"description": null,
"game": 892970,
"owner": null,
"boosts": 1,
"last_offline": 1780216294,
"last_online": 1780691447,
"icon": null,
"name": "ValheimPrime",
"connect": "148.113.152.61:20520",
"request": "148.113.152.61:20521",
"map": "ValheimPrime",
"gamemode": null,
"version": "0.221.12",
"numplayers": 2,
"maxplayers": 10,
"bots": 0,
"secured": false,
"private": true,
"country": "CA",
"status": true,
"votes": 0,
"points": 41,
"add_date": 1780216294,
"last_update": 1780691447,
"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": 218,
"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/11678176");
$data = json_decode($json, true);
var_dump($data);