API dla pravda
JSON dla programów, stron i innych
text
json
{
"response": {
"steam_id": "90286236101063683",
"domain": null,
"id": 10641433,
"ip": "64.87.42.137",
"port": 20120,
"query": 20121,
"project_id": null,
"color": 0,
"city": "Chicago",
"description": null,
"game": 1604030,
"owner": null,
"boosts": 1,
"last_offline": 1779114174,
"last_online": 1781283707,
"icon": null,
"name": "pravda",
"connect": "64.87.42.137:20120",
"request": "64.87.42.137:20121",
"map": "VRisingWorld",
"gamemode": "49e01227-ef0c-4809-971c-d98238d8b253",
"version": "0.0.0.1",
"numplayers": 0,
"maxplayers": 10,
"bots": 0,
"secured": true,
"private": false,
"country": "US",
"status": true,
"votes": 0,
"points": 30,
"add_date": 1763716275,
"last_update": 1781283707,
"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": 1125,
"language": "en",
"parked": false,
"app": {
"id": 55075,
"steam_id": 1604030,
"name": "V Rising",
"url": "v-rising"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}Przykłady kodu
php
<?php
$json = file_get_contents("https://api.gamemonitoring.pl/servers/10641433");
$data = json_decode($json, true);
var_dump($data);