Advertisement
Guest User

Untitled

a guest
Nov 6th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.45 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. $ip = $_SERVER['REMOTE_ADDR'];
  5.  
  6. $user_password = 'PW';
  7. $sent_pw = $_REQUEST['pwd'];
  8. $credited = intval($_REQUEST['c']);
  9. $credituser = trim($_REQUEST['usr']);
  10. $rate = trim($_REQUEST['r']);
  11. $type  = intval($_REQUEST['t']);
  12. $transaction  = trim($_REQUEST['none']);
  13. $allowed_ip = array('199.193.247.113');
  14. require_once('libs/faucetbox.php');
  15. $ref = $_COOKIE['ref'];
  16. $ref_rate = $rate/10;
  17. $api_key = "API";
  18. $currency = "BTC";
  19. $faucetbox = new FaucetBOX($api_key, $currency);
  20.  
  21. if(in_array($ip, $allowed_ip) && $sent_pw == $user_password)
  22. {
  23.     if($credited == '1')
  24.     {
  25.         if($type == '1')
  26.         {
  27.          
  28.         exit('ok');
  29.          
  30.        
  31.         }elseif($type == '2'){       
  32.        
  33.         $result = $faucetbox->send($ref, $rate_rate);
  34.                                      
  35.                                      
  36.                                    
  37. $result["html"];
  38.  
  39. if($result["success"] === true) {
  40.     echo $result["html"];          
  41.  
  42.  
  43. } else {                        
  44.    
  45.     echo $result["html"];          
  46.  
  47. }
  48.         exit('ok');
  49.          
  50.         }
  51.        
  52.     }elseif($credited == '2')
  53.     {
  54.         if($type == '1')
  55.         {
  56.             /* This is a DEBIT Transaction, and is DEBITING  cash*/
  57.        
  58.         /* RUN YOUR QUERY  HERE */
  59.        
  60.         /* IF SUCCESS, MUST RETURN OK
  61.         exit('ok');
  62.         */
  63.         }elseif($type == '2'){
  64.            
  65.             /* This is a DEBIT Transaction, and is DEBITING cash*/
  66.        
  67.         /* RUN YOUR QUERY  HERE */
  68.        
  69.         /* IF SUCCESS, MUST RETURN OK
  70.         exit('ok');
  71.         */
  72.         }
  73.     }
  74. }
  75. else{
  76.     die();
  77. }
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement