Naxtie
mapper, designer
Here's my link, Loralia - PayGol
Here's my link, Loralia - PayGol
You have premium points: 900000
trou now is ok ?
You have premium points: 5001240
yea, you should improve it, I also have tons, but jus to check it..
Yea its not secure, but you can always fix it, you used normal mysql querys, instead of gesior pdo querys, thats why,,
<?php
/*
Note:Before starting you have to create an account at http://www.paygol.com/register?affiliatecode=T8Y7-LK0M-NY0R-Y6O3
*/
// check that the request comes from PayGol server
if(!in_array($_SERVER['REMOTE_ADDR'],
array('109.70.3.48', '109.70.3.146', '109.70.3.58'))) {
header("HTTP/1.0 403 Forbidden");
die("Error: Unknown IP");
}
// get the variables from PayGol system
$message_id = $_GET['message_id'];
$service_id = $_GET['service_id'];
$shortcode = $_GET['shortcode'];
$keyword = $_GET['keyword'];
$message = $_GET['message'];
$sender = $_GET['sender'];
$operator = $_GET['operator'];
$country = $_GET['country'];
$custom = $_GET['custom'];
$points = $_GET['points'];
$price = $_GET['price'];
$currency = $_GET['currency'];
//Replace these parameters by your database details
$dbhost = "localhost"; //Your database domain
$dbuser = "root"; //Database username
$dbpassword = "dbpass"; //Database password
$db = "dbname"; //Database name
//Connect to Database
if ($custom == X) {
$conn = mysql_connect($dbhost, $dbuser, $dbpassword);
mysql_select_db($db);
$sql = "UPDATE accounts SET premium_points = premium_points+'".mysql_real_escape_string($points)."' WHERE name = '".mysql_real_escape_string($custom)."'";
mysql_query($sql);
mysql_close($conn);
} else {
die("Error");
}
?>
Works very well. I am new to having a shop on an OT but I just looked up the earnings you make using paygol, it's like 50% of the amount someone donates. So for example someone donates 5 euros, you recive 2,5 euroes. Isin't that a lot? If it is, which alternatives are there that doesn't take such a huge chunk of the donations?
Thanks for the script btw, excellent guide.