API for developer

Check the votes of your players

Our API verifies that the vote of the user has been confirmed. It returns 1 if the vote was confirmed and empty data if it has not been.

PHP Code (BRUT)

<?php
$API_id = ID; // ID of your server
$API_ip = $_SERVER['REMOTE_ADDR']; // IP address of the user
$API_url = "https://serveur-prive.net/api/vote/$API_id/$API_ip";
$API_call = @file_get_contents($API_url);
if($API_call == 1) {
// Confirmed vote
// Here you update the user's points
}
else {
// Vote not validated
}
?>

We also offer a second API in JSON to check a vote, retrieve the date and time remaining before the next vote.

Code PHP (JSON)

<?php
$API_id = ID; // ID of your server
$API_ip = $_SERVER['REMOTE_ADDR']; // IP address of the user
$json = file_get_contents("https://serveur-prive.net/api/vote/json/$API_id/$API_ip");
$json_data = json_decode($json);

if($json_data->status == 1) {
echo 'You voted well.';

// You can use the following variables:
// $json_data->vote = Corresponds to the timestamp of the vote
// $json_data->nextvote = Corresponds to the remaining timestamp before the user can vote again
}
else {
echo 'You did not vote.';
}
?>


Example of returned result:

"status" = 1

{
"status":"1",
"vote":"1539775097",
"nextvote":"3749"
}

"status" = 0

{
"status":"0"
}

Want to retrieve the number of votes, clicks, comments or the rating of your server?

PHP Code (BRUT)

<?php
$API_id = ID; // ID of your server
$API_da = 'vote'; // vote,clic,commentaire,note
$API_url = "https://serveur-prive.net/api/stats/$API_id/$API_da";
$API_call = @file_get_contents($API_url);
echo $API_call;
?>

Sign up, add your server and click on the icon to retrieve the code set with your server ID.