Callback Guide

How does Incentive Voting work?

After you set up your postback script on your server, and put the link to it inside your settings you need to use the Postback Button Code.

<a href="[PlayerID]">

Code [PlayerID] contain the ID that you identify your player with.

Example Player "John" has the account ID "1417" the link would be:

<a href="">

That means you have to dynamically put the players account ID into that link code, for example like this:

<?php echo '"' . $_SESSION['PlayerID'] . '"' ?>
If you store the ID ("1417") inside the Session Variable.

Replace SiteName with the ID assigned to your website, and IPtoCheck with the user's IP.
The page will return 0 if the user has not voted today, and 1 if they have.

IP Check PHP Example

$result = file_get_contents("");

if($result == 1) {

//User has voted in last 12H - reward the user
} else {

//This user hasn't actually voted, perhaps make a log about this.

It's recommended that you keep a local log so you will not give a reward twice for the same vote.

PHP Example

      #Example PHP Postback Script
      #Toprsps does not take responsibility or liability for the use of this php snippet

// Your Database Connection Details
$host = 'localhost';
$db_name = '';
$db_user = '';
$db_password = '';
mysql_connect($host, $db_user, $db_password);

function _VoteReward($userId, $userIp, $valid) {

      if($valid == 1) {

            // Make userid safe to use in query
            $userId = mysql_real_escape_string($userId);

            // Check if that user votes already
            // Adjust this query to match your table name etc
            $voted = mysql_fetch_array(mysql_query("SELECT voted FROM vote_list WHERE user = '$userId'"));
            if(!$voted[0]) {
               // User has not voted, grant him reward, for example points
              mysql_query("UPDATE votepoints SET points = points+1 WHERE user = '$userId'");

//-------------------------- Don't change anything below this! -----------------------------
$Whitelist = array('');

$userId = isset($_POST['userid']) ? $_POST['userid'] : null;
$userIp = isset($_POST['userip']) ? $_POST['userip'] : null;
$valid = isset($_POST['voted']) ? intval($_POST['voted']) : 0;
$at_refc = isset($_POST['at_refc']) ? $_POST['at_refc'] : null;

$result = false;
if (!empty($userId) && !empty($at_refc)) {

      if (in_array($at_refc, $Whitelist)) {
            $result = true;
            _VoteReward($userId, $userIp, $valid);

if ($result) {
      echo 'OK';

//Close Connection

If you need additional assistance or have any questions, please Contact us.

Powered by VisioList 1.6