MyTOP Reset: 02 Hours 04 Minutes 22 Seconds

Postback Information



Voting Postback

When user votes, you can add their [UniqePlayerID] (max 20 characters) to the site voting URL

e.g. https://www.mtop.site/page/vote/site/[SiteID]/custom/[UniqePlayerID]

     * Replace [SiteID] with your site ID from https://mtop.site.

     * Replace [UniqePlayerID] with UniqeID that you identify your players with.

on successfull vote we will send back [custom] POST to specified postback URL.

Example PHP Code

 <?php
   if(gethostbyname("mtop.site") == $_SERVER['REMOTE_ADDR']){

     $UniqeUserID = mysqli_escape_string($_POST['custom']);

     //check db if user has voted and [UniqeUserID] is valid

     $check_vote = mysqli_fetch_array(mysqli_query("SELECT vote FROM user WHERE userid = '$UniqeUserID'"));

     if($check_vote[0] == '0'){

         //Credit user for voting, for example 100 credits.

         mysqli_query("UPDATE user SET credits = credits + 100 WHERE userid = '$UniqeUserID'");

     } else {

         //Save failed postback error with [UniqeUserID] for debug

     }

   }
 ?>