1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| <?php
/*
Offer Walls Addon,Created By shipu
you may not rip,copy or distribute this code.don't remove these lines
contact shipu98@gmail.com for any query related to this addon.
*/
require_once("includes/config.php");
$DBHost = $config['Database']['servername'];
$DBUser = $config['Database']['username'];
$DBPassword = $config['Database']['password'];
$DBDatabase = $config['Database']['dbname'];
$con = new mysqli("$DBHost","$DBUser","$DBPassword","$DBDatabase");
$SECRET_KEY = "codesecret"; // secret for my app
$transaction_id = $_REQUEST['id'];
$user_id = $_REQUEST['uid'];
$offer_id = $_REQUEST['oid']; // completed offer or payment method
$new_currency = $_REQUEST['new'];
$hash_signature = $_REQUEST['sig'];
$company = "SuperRewards";
$date = date('D.M.Y');
$cash = $new_currency * (0.005);
$hash = md5($transaction_id.':'.$new_currency.':'.$user_id.':'.$SECRET_KEY);
if ($hash != $hash_signature) {
// signature doesn't match, respond with a failure
echo "0\n";
exit;
}
// all good!
$con->query("INSERT INTO `ptcwall_postback` (id, user, user_reward, reward_type, click_id, history_type, date) VALUES ('NULL', '$user_id', '$cash', 'credit', '0', '$company', '$date' )");
$con->query("UPDATE members SET money=money+'$cash' WHERE username='$user_id'");
echo "1\n";
?> |
Partager