hello guys iam wanna help with setup superrewards in my site and automatic donate to the player
Planning on selling it to him?Quote:
Contact me on skype
<?php
require_once('SRPostbackHandler.class.php');
header('Content-Type:text/plain');
$sr_postback_handler = new SRPostbackHandler("00000000000000000000000000000000");
echo $sr_postback_handler->HandlePostback($_REQUEST['id'], $_REQUEST['uid'], $_REQUEST['oid'], $_REQUEST['new'], $_REQUEST['total'], $_REQUEST['sig']);
// This script will output a status code of 1 (Success) or 0 (Try sending again later).
?>
<?php
class SRPostbackHandler
{
function __construct($app_secret)
{
$this->app_secret = $app_secret;
}
function HandlePostback($id = 0, $uid = 0, $oid = 0, $new = 0, $total = 0, $sig = 0)
{
include_once("../includes/config.php");
if(!(is_numeric($id) || is_numeric($uid) || is_numeric($oid) || is_numeric($new) || is_numeric($total)))
return 0;
$this->id = $id; // ID of this transaction.
$this->uid = $uid; // ID of the user which performed this transaction.
$this->oid = $oid; // ID of the offer or direct payment method.
$this->new = $new; // Number of in-game currency your user has earned by completing this offer.
$this->total = $total; // Total number of in-game currency your user has earned on this App.
$this->sig = $sig; // Security hash used to verify the authenticity of the postback.
$result = 1;
$sig_compare = md5($this->id.':'.$this->new.':'.$this->uid.':'.$this->app_secret);
// Only accept if the Security Hash matches what we have.
if($this->sig == $sig_compare)
{
$sql->Query("UPDATE SK_Silk SET silk_own += '".$this->new."' where JID = '".$this->uid."'; ");
}
else
{
$result = 0; // Security hash incorrect. Fail.
}
return $result;
}
}
?>
<iframe src="https://wall.superrewards.com/super/offers?h=rsihmylmmje.2959566260&uid='.$_SESSION['JID'].'" frameborder="0" width="728" height="1700" scrolling="no"></iframe>
really i dun know what to say to you , really thanks alot :)Quote:
Planning on selling it to him?
postback.php
SRPostbackHandler.class.phpCode:<?php require_once('SRPostbackHandler.class.php'); header('Content-Type:text/plain'); $sr_postback_handler = new SRPostbackHandler("00000000000000000000000000000000"); echo $sr_postback_handler->HandlePostback($_REQUEST['id'], $_REQUEST['uid'], $_REQUEST['oid'], $_REQUEST['new'], $_REQUEST['total'], $_REQUEST['sig']); // This script will output a status code of 1 (Success) or 0 (Try sending again later). ?>
This iframe you get from the SR page to add to your donation pageCode:<?php class SRPostbackHandler { function __construct($app_secret) { $this->app_secret = $app_secret; } function HandlePostback($id = 0, $uid = 0, $oid = 0, $new = 0, $total = 0, $sig = 0) { include_once("../includes/config.php"); if(!(is_numeric($id) || is_numeric($uid) || is_numeric($oid) || is_numeric($new) || is_numeric($total))) return 0; $this->id = $id; // ID of this transaction. $this->uid = $uid; // ID of the user which performed this transaction. $this->oid = $oid; // ID of the offer or direct payment method. $this->new = $new; // Number of in-game currency your user has earned by completing this offer. $this->total = $total; // Total number of in-game currency your user has earned on this App. $this->sig = $sig; // Security hash used to verify the authenticity of the postback. $result = 1; $sig_compare = md5($this->id.':'.$this->new.':'.$this->uid.':'.$this->app_secret); // Only accept if the Security Hash matches what we have. if($this->sig == $sig_compare) { $sql->Query("UPDATE SK_Silk SET silk_own += '".$this->new."' where JID = '".$this->uid."'; "); } else { $result = 0; // Security hash incorrect. Fail. } return $result; } } ?>
P.S the user must be logged in to obtain an account JID
Code:<iframe src="https://wall.superrewards.com/super/offers?h=rsihmylmmje.2959566260&uid='.$_SESSION['JID'].'" frameborder="0" width="728" height="1700" scrolling="no"></iframe>