Postback Documentation
Parameter | Description | Macros |
---|---|---|
app_name | Returns the app name | {app_name} |
userid | This is the unique identifier code of the user who completed action on your platform. | {userid} |
password | If your postback has a password associated, we pass this password back to you. | {password} |
user_amount | The amount of your virtual currency to be credited to your user. | {user_amount} |
offer_name | Name of completed offer. | {offer_name} |
offer_id | ID of completed offer. | {offer_id} |
payout | The offer payout in $ (USD). | {payout} |
ip_address | Converting device's IP address if known, 0.0.0.0 otherwise. | {ip_address} |
currency_name | Virtual currency name defined in your app settings. | {currency_name} |
date | The date on which the offer was completed. | {date} |
Postbacks Example:
<?php
//php code example
$user_id = $_REQUEST['userid'];
$ip_address = $_REQUEST['ip_address'];
$offer_name = $_REQUEST['offer_name'];
$offer_id = $_REQUEST['offer_id'];
$app_name = $_REQUEST['app_name'];
$user_amount = $_REQUEST['user_amount'];
$payout = $_REQUEST['payout'];
$currency_name = $_REQUEST['currency_name'];
$date = $_REQUEST['date'];
//If your postback has a password associated, we pass this password back to you
$password = $_REQUEST['password'];
$my_password = "your-postback-password-here";
//Database Connection
$host = "your-host-server";
$dbuser = "your-database-username";
$dbpassword = "your-database-password";
$dbname = "your-database-name";
$db = mysqli_connect($host,$dbuser,$dbpassword,$dbname);
if (isset($user_id) && $password == $my_password) {
mysqli_query($db,"INSERT INTO
leads (user_id , offer_name , offer_id , ip_address , app_name , offer_payout , user_amount , currency_name , date)
VALUES ('".$user_id."','".$offer_name."','".$offer_id."','".$ip_address."','".$app_name."','".$offer_payout."','".$user_amount."','".$currency_name."','".$date."')");
}
?>