Elexonic
Well-Known Member
- Joined
- Jun 18, 2008
- Messages
- 1,920
- Reaction score
- 59
Hi.
Using debian 6.0
Using modern account rev 244
And using
I have file paypal.log in www
I have folder paypal and within I have
index.html
ipn.php
and a file called scammer.
The problem is that you are missing points to players, and I do not know why not get someone knows how to fix it?
Thank you.
Using debian 6.0
Using modern account rev 244
And using
I have file paypal.log in www
I have folder paypal and within I have
index.html
HTML:
<HTML>
<HEAD>
<TITLE>Page has moved</TITLE>
</HEAD>
<BODY>
</BODY>
</HTML>
ipn.php
Code:
<?php
if ($_REQUEST['debug']) {
ini_set("display_errors", True);
error_reporting(E_ALL);
}
$mysql_host = 'localhost'; //Leave at localhost
$mysql_user = 'root'; //DB User
$mysql_pass = 'xxxx'; //DB Pass
$mysql_db = 'data'; //DB Name
$file = '../paypal.log'; //Paypal Log Name will be placed in the same location as your ipn.php file
// Anti-Scam
$payer_email = $_REQUEST['payer_email'];
$ip = $_SERVER['REMOTE_ADDR'];
if($ip != "66.211.170.66" && $ip != "216.113.188.202" && $ip != "216.113.188.203" && $ip != "216.113.188.202") {
print "Scammer...";
$hak = fopen("scammer.log", "a");
fwrite($hak, "$ip \r\n");
fclose($hak);
die(0);
}
$time = date("F j, Y, g:i a");
$paylist = array("1.00" => 10, "5.00" => 50, "10.00" => 100, "15.00" => 225, "20.00" => 300);
// connect db
$db = mysql_connect($mysql_host, $mysql_user, $mysql_pass);
$custom = stripslashes(ucwords(strtolower(trim($_REQUEST['custom']))));
$receiver_email = $_REQUEST['receiver_email'];
$payment_status = $_REQUEST['payment_status'];
$mc_gross = $_REQUEST['mc_gross'];
mysql_select_db($mysql_db, $db);
if ($_REQUEST['debug']){
print $payment_status . '\n';
print (isset($paylist[$mc_gross])) ? 1 : 0 . '\n';
print $receiver_email . '\n';
print $custom . '\n';
}
if ($payment_status == "Completed" && $receiver_email == "[email protected]" && isset($paylist[$mc_gross])) {
$query = "SELECT premium_points FROM accounts WHERE accounts.name = '$custom'";
$result = mysql_query($query);
$prem = mysql_fetch_array($result);
$somecode = "'$time' '$custom' '$payer_email' '$mc_gross' '$ip'\r\n";
// figure out how much to give
$give = $paylist[$mc_gross];
$points = $prem['premium_points'] + $give;
// $points = mysql_query($prem)
$qry2 = "UPDATE accounts SET premium_points = '$points' WHERE accounts.name = '$custom'";
// Log Paypal Transaction
$hak = fopen($file, "a");
fwrite($hak, $somecode);
fclose($hak);
//Everything looks fine, add points and log them.
$result2 = mysql_query($qry2);
$log_data = mysql_query($executepaypallog);
}
else
{
echo("Error.");
}
?>
and a file called scammer.
The problem is that you are missing points to players, and I do not know why not get someone knows how to fix it?
Thank you.