Hey,
Codeblok (buypoints.php):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Als ik iets koop, dan komt er Error: Unknown IP te staan, en als ik dat weg haal insert hij niks in de database..
Codeblok (paygol.php):
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
// 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 all parameters from PayGol
$message_id = $_GET[message_id];
$shortcode = $_GET[shortcode];
$keyword = $_GET[keyword];
$message = $_GET[message];
$sender = $_GET[sender];
$operator = $_GET[operator];
$country = $_GET[country];
$custom = $_GET[custom];//
$price = $_GET[price];
$currency = $_GET[currency];
$points = $_GET[points];
//Replace these parameters by your database details
$dbhost = "localhost"; //Your database domain
$dbuser = "root"; //Database username
$dbpassword = "***"; //Database password
$db = "db"; //Database name
//Connect to Database
$conn = mysql_connect($dbhost, $dbuser, $dbpassword);
mysql_select_db($db);
$sql = "INSERT INTO paygol VALUES (null, $custom, $price, $date)";
mysql_query($sql);
mysql_close($conn);
?>
Poedeltje.
Codeblok (buypoints.php):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Als ik iets koop, dan komt er Error: Unknown IP te staan, en als ik dat weg haal insert hij niks in de database..
Codeblok (paygol.php):
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
// 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 all parameters from PayGol
$message_id = $_GET[message_id];
$shortcode = $_GET[shortcode];
$keyword = $_GET[keyword];
$message = $_GET[message];
$sender = $_GET[sender];
$operator = $_GET[operator];
$country = $_GET[country];
$custom = $_GET[custom];//
$price = $_GET[price];
$currency = $_GET[currency];
$points = $_GET[points];
//Replace these parameters by your database details
$dbhost = "localhost"; //Your database domain
$dbuser = "root"; //Database username
$dbpassword = "***"; //Database password
$db = "db"; //Database name
//Connect to Database
$conn = mysql_connect($dbhost, $dbuser, $dbpassword);
mysql_select_db($db);
$sql = "INSERT INTO paygol VALUES (null, $custom, $price, $date)";
mysql_query($sql);
mysql_close($conn);
?>
Poedeltje.

!