API dla Casual survival
JSON dla programów, stron i innych
text
json
{
"response": {
"steam_id": "90286620380006406",
"domain": null,
"id": 10879331,
"ip": "104.249.62.166",
"port": 29016,
"query": 29016,
"project_id": null,
"color": 0,
"city": "Bend",
"description": null,
"game": 244850,
"owner": null,
"boosts": 1,
"last_offline": 1780259045,
"last_online": 1780675993,
"icon": null,
"name": "Casual survival",
"connect": "104.249.62.166:29016",
"request": "104.249.62.166:29016",
"map": "Space Force",
"gamemode": "Space Engineers",
"version": "1209024",
"numplayers": 0,
"maxplayers": 10,
"bots": 0,
"secured": true,
"private": false,
"country": "US",
"status": true,
"votes": 0,
"points": 30,
"add_date": 1768319563,
"last_update": 1780675993,
"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": 1168,
"language": "en",
"parked": false,
"app": {
"id": 97,
"steam_id": 244850,
"name": "Space Engineers",
"url": "space-engineers"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}Przykłady kodu
php
<?php
$json = file_get_contents("https://api.gamemonitoring.pl/servers/10879331");
$data = json_decode($json, true);
var_dump($data);