duration - Time window in minutes (optional, default: 180)
Response:
The API returns a JSON object:
voted - Player has voted within the specified duration
nickname - Player's nickname if provided during vote
voted_at - Timestamp of the vote
PHP Example (3 hours verification):
<?php
$vote_verif = file_get_contents('https://hytale-servers.best/api/vote-verification?server_id=YOUR_SERVER_ID&ip=127.0.0.1&duration=180');
if($vote_verif == 1) {
echo "Player has voted in the last 3 hours";
} else if($vote_verif == 0) {
echo "Player has not voted in the last 3 hours";
}
?>
Players Counting Setup
Download and install the Query Mod on your server. We'll automatically ping your server to check its status.
Info: In order to ping your server and show player counts, you need to download the Query Mod. It is a small mod that allows you to ping your server. Simply drop it into your mods/ folder and restart your server.