How can we help you?

We compiled a list of common questions with answers which you might need, however if you cannot find your answer feel free to contact us.

What is Postback ?

The Postback feature allows you to reward your users for voting your game.

This is a great way of inviting your users to promote your game to the top of the list.

We designed our Postback system unlike any other. It sends you back nearly real-time data to your website so you can automatically reward your users for their vote.

How to use Postback ?

The Postback feature is by default disabled for every listing added. You must enable the post feature for each listing individually from your account by clicking the "Actions" section.

Step 1:

Prepare your postback receiver, this can be implemented within your CMS/website or you can use our example below.

Save the following code as supremetop_postback.php:


// If you use this check, the below are not relevant.
// However we do not recommened relying on IP checks as this might change in the future
$requester_ip = isset($_SERVER["HTTP_X_FORWARDED_FOR"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"] : $_SERVER['REMOTE_ADDR'];
$supremetop100_ips = ['176.31.56.245'];
if(!in_array($requester_ip, $supremetop100_ips)) {
// Do not give too many details, because the attacker is smart.
die('Invalid request!');
}
// Ensure that it is a POST request.
if(strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') != 0) {
// Do not give too many details, because the attacker is smart.
die('Invalid request!');
}
// Ensure that this is SupremeTop100 sending the request
if(strcasecmp($_SERVER['HTTP_USER_AGENT'], 'SupremeTop100/1.0 (Linux; x64) Postback Agent') != 0) {
// Do not give too many details, because the attacker is smart.
die('Invalid request!');
}
// Ensure that the content type of the POST request has been set to application/json
$contentType = isset($_SERVER["CONTENT_TYPE"]) ? trim($_SERVER["CONTENT_TYPE"]) : '';
// For RESTful response
// For "normal" response use 'application/x-www-form-urlencoded'
if(strcasecmp($contentType, 'application/json') != 0) {
// Do not give too many details, because the attacker is smart.
die('Invalid request!');
}
// Retrieve the RAW POST data.
$content = trim(file_get_contents("php://input"));
// Attempt to decode the incoming RAW POST data from JSON.
$decoded = json_decode($content, true);
// If json_decode failed, the JSON is invalid.
if(!is_array($decoded)) {
// Do not give too many details, because the attacker is smart.
die('Invalid request!');
}
// Process the JSON parsed as array.
if($decoded['supremetop100_vote_info']['status'] == 1) {
// Rewards your user by username or character name
}
// Additionally log the whole postback data to file or database
$log_filename = sprintf("%s_voteData.txt", date('Y-m-d_H-i-s'));
@file_put_contents($log_filename, print_r($decoded, true));


Step 2:

Activate the postback for your listing by specifying the full URI path the file we just saved: https://yourwebsite.com/supremetop100_postback.php

NOTE: You do not need to add any URL parameters here.


Step 3:

You need to modify your existing vote in link, to include the ?postback=1 URL parameter.

Add your desired parameters to the URL in order to know which user to reward. You can add 2 parameters:

  • https://yourwebsite.com/supremetop100_postback.php?postback=1&username=PLAYER_NAME
  • https://yourwebsite.com/supremetop100_postback.php?postback=1&character=PLAYER_CHARACTER_NAME

Optionally you can add both of them:

  • https://yourwebsite.com/supremetop100_postback.php?postback=1&username=PLAYER_NAME&character=PLAYER_CHARACTER_NAME

Warning:

Do not add any other parameters, because none of them are used. Do not add anything else either in the 2 parameters above other than what they are intended for, for example do not add email addresses. Doing so will only break your postback feature.


Final Step:

Ensure everything is setup as instructed, otherwise the postback system will not work.

As a reminder, you need to ensure the following:

  • The postback feature is enabled for your listing
  • You added the correct link in the postback setup
  • You modified your vote in link on your website so users visit the new URL

Response Postback:

Our system will send you as much information as possible so you can properly check your users if they voted legitimately or not.

You can also use our response as statistics in order to see from what/where they voted or tried to vote.

Optionally you can use our response timing to show the users that he already voted in the time limit.

The response you will receive is as follows (JSON format, some data removed for privacy):

{
"supremetop100_vote_info":{
"status": 0,
"message": "This IP already voted in last 12 hours.",
"time_passed": "01 hours 35 minutes 47 seconds.",
"time_left": "10 hours 24 minutes 13 seconds."
},
"supremetop100_user_info":{
"ip_address": "",
"username": "",
"character": ""
},
"supremetop100_geo_info":{
"country":{
"name": "",
"iso_code": "",
"geo_code": "",
"in_eu": ""
},
"city":{
"name": "",
"postal_code": ""
},
"location":{
"latitude": "",
"longitude": ""
},
"network":{
"cidr": "",
"asn":{
"number ":"",
"organisation ":""
}
}
}
}

Final Notes:

We do not disclose how we check the user votes, but we can advise you on what to do to ensure your users are not taking advantage of your rewards.

Use the information we send back to you, store it in a database and check the username/character and the vote time.

This will ensure they legitimately get the rewards only as per your own rules.

Security

We take security very seriously and this is why efforts have been made to keep your data as safe as possible.

Our technology stack uses the latest industry standard features ensuring maximum security.

Please read our Terms and Conditions and Privacy Policy for more information.

Privacy

We take your privacy very seriously and this is why we guarantee that any of your data submitted on this website will never be sold or shared to anyone. Ever.

Please read our Terms and Conditions and Privacy Policy for more information.


Found a problem on this page ? Please help us improve it. Contact Us and get a reward!