API dla Wilton
JSON dla programów, stron i innych
text
json
{
"response": {
"fps": 235,
"fps_avg": 229,
"entities_count": 49099,
"world_seed": 676769,
"world_size": 3000,
"steam_id": "90286898032348187",
"domain": null,
"id": 11800853,
"ip": "51.79.46.248",
"port": 28270,
"query": 28271,
"project_id": null,
"color": 0,
"city": "Montreal",
"description": null,
"game": 252490,
"owner": null,
"boosts": 1,
"last_offline": 1781463032,
"last_online": 1781526176,
"icon": null,
"name": "Wilton",
"connect": "51.79.46.248:28270",
"request": "51.79.46.248:28271",
"map": "Procedural Map",
"gamemode": "Survival",
"version": "2627",
"numplayers": 0,
"maxplayers": 10,
"bots": 0,
"secured": true,
"private": false,
"country": "CA",
"status": true,
"votes": 0,
"points": 30,
"add_date": 1781463032,
"last_update": 1781526176,
"banned": false,
"wipe": 1781221106,
"official": null,
"wipe_period": null,
"next_wipe": null,
"pve": 0,
"pvp": null,
"list_hidden": false,
"hide_address": false,
"hide_query": false,
"position_game": 10429,
"language": "en",
"parked": false,
"app": {
"id": 12,
"steam_id": 252490,
"name": "Rust",
"url": "rust"
},
"server_owner": null,
"mods": [],
"disabled_modules": []
}
}Przykłady kodu
php
<?php
$json = file_get_contents("https://api.gamemonitoring.pl/servers/11800853");
$data = json_decode($json, true);
var_dump($data);