Postback
The automatic postback system will send the IP address, user ID (If specified) of the voting user, the Postback Password, set in your site settings, and if the vote counted or not to your listener
The script will have a 5 second timeout, if a connection cannot be established within that time no data will be posted to your server.
To set your postback listener URL and Postback Password go to the User Panel page.
There are two vote URL options.
1) Keep the default voting URL which will only send the user's IP address:https://mmtop200.com/vote/SITEID
2) Modify the voting link to send the User ID / Account ID as well:
https://mmtop200.com/vote/SITEID/[ID]
Replace SITEID with your site ID, and [ID] with the User's ID.
WARNING: You have to do all checks on your side to see if the specific IP address or user ID have voted, the postback information will be sent as soon as the correct captcha is entered.
Current Postback IP: 190.92.153.241
The postback system will send the following parameters: ip_addr, uid, postback_password, vote_counted
An example PHP code can be found below:
<?php
if ($_SERVER["REMOTE_ADDR"] != gethostbyname("validator.mmtop200.com")) {
exit();
}
// Your postback password
$_postback_password = "";
// Postback password
$postback_password = $_POST["postback_password"];
// Vote counted
$vote_counted = $_POST["vote_counted"];
if ($_postback_password != $postback_password) {
// Passwords do not match
exit();
}
// User IP Address
$user_ip_addr = $_POST["ip_addr"];
// User ID -- Make sure to sanitize the User ID
$user_id = $_POST["uid"] ?? "";
if ($user_id) {
// User ID is not empty.
}
if ($vote_counted) {
// Vote counted
}
// Give incentives to your player.
?>