Blank Postback File For Custom Scripts
This is the .php file for accepting postbacks. Besure to include the starting and ending php tag.
$ip = $_SERVER['REMOTE_ADDR'];
$user_password = ' ENTER YOUR POSTBACK PASSWORD HERE';
$sent_pw = $_REQUEST['pwd'];
$credited = intval($_REQUEST['c']);
$credituser = trim($_REQUEST['usr']);
$rate = trim($_REQUEST['r']);
$type = intval($_REQUEST['t']);
$transaction = trim($_REQUEST['none']);
$allowed_ip = array('138.197.7.220');
if(in_array($ip, $allowed_ip) && $sent_pw == $user_password)
{
if($credited == '1')
{
if($type == '1')
{
/* This is a CREDIT Tansaction, and is rewarding cash*/
/* RUN YOUR QUERY HERE */
/* IF SUCCESS, MUST RETURN OK
exit('ok');
*/
}elseif($type == '2'){
/* This is a CREDIT Transaction, and is rewarding POINTS*/
/* RUN YOUR QUERY HERE */
/* IF SUCCESS, MUST RETURN OK
exit('ok');
*/
}
}elseif($credited == '2')
{
if($type == '1')
{
/* This is a DEBIT Transaction, and is DEBITING cash*/
/* RUN YOUR QUERY HERE */
/* IF SUCCESS, MUST RETURN OK
exit('ok');
*/
}elseif($type == '2'){
/* This is a DEBIT Transaction, and is DEBITING cash*/
/* RUN YOUR QUERY HERE */
/* IF SUCCESS, MUST RETURN OK
exit('ok');
*/
}
}
}
else{
die();
}
/* FIle Provided As Is */
Download File Here: Download