Incentive API

Vote postback

Reward players in-game after they vote. Paste the ServerTop100 button on your site, set a callback URL on your listing, and we ping your script after every vote attempt.

Footer vote button · 88×51

This is the image players click

Put it in the footer of your game site. Click opens the vote page and fires your postback.

Vote on ServerTop100 Actual size 88×51

Copy and paste

HTML embed

Replace YOUR_USERNAME with the listing username from the dashboard. Optional: keep PLAYER_ID so we can send it back as userid.

  1. 01 Enable postback

    Dashboard → your listing → callback URL, mode, API secret.

  2. 02 Paste the button

    Drop the 88×51 image in your site footer. Players click it to vote.

  3. 03 Reward on callback

    We call your script after every vote attempt. Credit the player when voted=1.

Standard

GET + POST

Recommended mode sends secret, voted, reset, userip, userid and custom — once as GET and once as POST.

Unique only

Successful votes

Calls your script only on a successful unique vote: p_resp=[PlayerID] and ip=[USERIP].

Footer button

in.php + button.php

Click URL: in.php?site=USERNAME. Image: button.php?u=USERNAME. Player aliases: id, postback, incentive, pingUsername, p, userid.

Vote links

Compatible URLs

https://servertop100.com/vote/[USERNAME]?id=[PlayerID]
https://servertop100.com/in.php?site=[USERNAME]&id=[PlayerID]
https://servertop100.com/index.php?a=in&u=[USERNAME]&id=[PlayerID]
https://servertop100.com/in.asp?id=[USERNAME]&incentive=[PlayerID]
https://servertop100.com/[game]/in-[USERNAME]-[PlayerID]
https://servertop100.com/[game]/sitedetails/[USERNAME]?vote=1&pingUsername=[PlayerID]

Dynamic callback: append callback=[base64]. We return it as custom.

Payload

What we send

  • secretYour listing API secret
  • voted1 unique · 0 duplicate / failed
  • resetUnix time of next noon or midnight UTC
  • useripVoter IP
  • useridPlayer id if you passed it
  • customThe base64 callback string

Unique-only mode uses p_resp and ip instead, and only when the vote is unique.

Example

PHP receiver

<?php
$my_secret = 'YOUR_API_SECRET';
$secret = isset($_POST['secret']) ? $_POST['secret'] : (isset($_GET['secret']) ? $_GET['secret'] : '');
if ($secret !== $my_secret) { exit; }

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

if ($userid && $valid === 1) {
    // reward player, store $reset as next_vote
}