Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.49 KB | None | 0 0
  1. <?php
  2. /*
  3.  
  4. Note:Before starting you have to create an account at http://www.paygol.com/register?affiliatecode=T8Y7-LK0M-NY0R-Y6O3
  5.  
  6. */
  7.  
  8. // check that the request comes from PayGol server
  9. if(!in_array($_SERVER['REMOTE_ADDR'],
  10.   array('109.70.3.48', '109.70.3.146', '109.70.3.58'))) {
  11.   header("HTTP/1.0 403 Forbidden");
  12.   die("Error: Unknown IP");
  13. }
  14. // CONFIG
  15. $your_service_id = 100901;  // Your service ID from Paygol
  16.  
  17. // get the variables from PayGol system
  18. $message_id    = $_GET['message_id'];
  19. $service_id    = $_GET['service_id'];
  20. $shortcode    = $_GET['shortcode'];
  21. $keyword    = $_GET['keyword'];
  22. $message    = $_GET['message'];
  23. $sender    = $_GET['sender'];
  24. $operator    = $_GET['operator'];
  25. $country    = $_GET['country'];
  26. $custom    = $_GET['custom'];
  27. $points    = $_GET['points'];
  28. $price    = $_GET['price'];
  29. $currency    = $_GET['currency'];
  30.  
  31. //Replace these parameters by your database details
  32. $dbhost     = "localhost"; //Your database domain
  33. $dbuser     = "root"; //Database username
  34. $dbpassword = "******"; //Database password
  35. $db         = "******"; //Database name
  36.  
  37. if ($your_service_id == $service_id) {
  38.     //Connect to Database
  39.     $conn = mysql_connect($dbhost, $dbuser, $dbpassword);
  40.     mysql_select_db($db);
  41.     $sql = "UPDATE accounts SET premium_points = premium_points+'".mysql_real_escape_string($points)."' WHERE name = '".mysql_real_escape_string($custom)."'";
  42.     mysql_query($sql);
  43.  
  44.     mysql_close($conn);
  45. }
  46.  
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement