Skip to content
New system

Reward players who vote for you

Players click your vote link, vote on ServerTop100, and we ping a script on your website so you can credit them in-game. Three steps. No polling.

1

Vote link

Put the player’s id on the URL.

2

Callback URL

Save it on the listing and turn it on.

3

Your script

We POST voted, userid and secret.

1

Copy the vote link

Replace [SLUG] with your listing slug and [PlayerID] with the logged-in player. That value comes back as userid.

vote link
https://privateserverzone.com/in/[SLUG]?id=[PlayerID]

Website button

html
<a href="https://privateserverzone.com/in/your-slug?id=PLAYER_NAME">Vote for us on ServerTop100</a>
2

Save the callback in the dashboard

Sign in → My servers → Vote rewards. Paste the HTTPS URL of your script and turn the new system on. Nothing is sent until both are saved.

  1. 1.Host the PHP from step 3 on your website.
  2. 2.Paste that URL into the listing (example https://your-game.com/vote.php).
  3. 3.Tick “Turn on the new postback system” and save.
Go to Vote rewards
3

Upload this PHP

On the listing page the secret is already filled in. Here it is YOUR_API_SECRET — replace it, or copy the ready file from Vote rewards.

php
<?php
# ServerTop100 — new postback system
# Host this file on HTTPS, then paste its URL into the listing's Postback page.

$my_secret = 'YOUR_API_SECRET';

$secret = $_POST['secret'] ?? $_GET['secret'] ?? '';
if ($secret !== $my_secret) {
    http_response_code(403);
    exit('bad secret');
}

$userid = $_POST['userid'] ?? $_GET['userid'] ?? '';
$voted  = (int)($_POST['voted'] ?? $_GET['voted'] ?? 0);
$reset  = (int)($_POST['reset'] ?? $_GET['reset'] ?? 0);

# voted=1 means this was a unique vote. Credit the player.
# voted=0 means they already voted — do not credit, optionally store $reset.
if ($userid !== '' && $voted === 1) {
    # Example:
    # $db->query('UPDATE users SET vote_points = vote_points + 1 WHERE name = ?', $userid);
}

http_response_code(200);
echo 'ok';

What we POST

Same fields on the query string, so $_POST and $_GET both work.

secretYour listing API secret. The public test form sends TEST.
voted1 = unique vote, credit the player. 0 = already voted, do not credit.
resetUnix time when that voter may vote again.
useridThe player id from id= on the vote link.
useripThe voter's IP, sent only to you.
customOnly used with the advanced dynamic callback.

Test a callback

Sends a fake vote with secret=TEST. No vote is stored. Owners can also test from the listing with the real API secret.

This is a simulation

Do not credit players from this form. The secret we send is TEST, not your production API secret.
Advanced: dynamic callback

Only if you need extra query parameters on a per-vote URL. The decoded host must match the callback saved on the listing.

url
https://privateserverzone.com/in/[SLUG]?callback=[base64_encode]

Encode with base64_encode() then urlencode(). Player id aliases: id, postback, incentive.

Questions

Can I reward players for voting?

Yes. Put a vote link with their player id on your website or in-game. After they vote here we call the callback URL you saved so your script can grant points, items or a cooldown.

Does this replace voting on my listing page?

No. Anyone can still vote from the public listing. Postback is extra: players who start on your server can vote here and get credited automatically.

What if they already voted?

We still call your script, with voted=0 and a reset timestamp for when they may vote again. Do not credit the player in that case.

Is the voter IP stored on ServerTop100?

No. We hash IPs for abuse protection and never keep the raw address. The userip field is sent only to your callback.