API dla Rust Server
JSON dla programów, stron i innych
text
json
{
"response": {
"steam_id": "90286610734407704",
"domain": null,
"id": 10661287,
"ip": "148.251.232.50",
"port": 28020,
"query": 28021,
"color": 0,
"city": "Falkenstein",
"description": "\nWelcome!\r\n Please note, this server is a work in progress and may have intermittent outages and/or changes during this time.\r\n You are of course welcome to play here, please contact me on Discord if you have any questions. https://discord.gg/8hKbwXreTu",
"game": 252490,
"owner": null,
"boosts": 1,
"last_offline": 1780608861,
"last_online": 1780643431,
"icon": null,
"name": "Rust Server",
"connect": "148.251.232.50:28020",
"request": "148.251.232.50:28021",
"map": "YOU NEED TO SEE THIS!",
"gamemode": "Rust",
"version": "2627",
"numplayers": 0,
"maxplayers": 50,
"bots": 0,
"secured": true,
"private": false,
"country": "DE",
"status": true,
"votes": 0,
"points": 60,
"add_date": 1764544717,
"last_update": 1780643431,
"banned": false,
"wipe": 1780608943,
"official": null,
"wipe_period": null,
"next_wipe": null,
"pve": 0,
"pvp": null,
"list_hidden": false,
"hide_address": false,
"hide_query": false,
"position_game": 3606,
"language": "de",
"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/10661287");
$data = json_decode($json, true);
var_dump($data);