Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2011
    Posts
    272
    Thanks
    63
    Thanked 1 Time in 1 Post

    Postback script GPT

    Hello, i have the following code:
    Code:
    <?
    include ("config.php");
    
    //here we will use get variables. 
    $snuid = $_GET['%yti%'];
    $campid = $_GET['%campaignid%'];
    $points = $_GET['%rate%'];
    $ip = $_SERVER['%REMOTE_ADDR%'];
    $sts = $_GET['%credit%'];
    
    
    if ($ip == "174.120.27.187" || "174.120.146.43" && $sts="1")
    {
    //INSERT LOGIC TO CREDIT POINTS TO USERS
    mysql_query("UPDATE members SET pokerpoints=pokerpoints+".$points." WHERE username='".$snuid."'");
    mysql_query("UPDATE members SET totalpointsearned=totalpointsearned+".$points." WHERE username='".$snuid."'");
    mysql_query("INSERT into recentpoints (message) VALUES ('$snuid has just cashed out for $points Bankroll Bucks')");
    mysql_close();
    }
    else
    {
    	die ("query failed");
    }
    ?>
    this script is a postback script for proleads/loypalpubs, and its supposed to credit the YTI(username) when someone completes an offer, but its not working and I dont know why.

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    try deleting all the %'s

    $_GET['%yti%'];

  • #3
    Regular Coder
    Join Date
    Jul 2011
    Posts
    272
    Thanks
    63
    Thanked 1 Time in 1 Post
    Didn't work.

  • #4
    Regular Coder
    Join Date
    Jul 2011
    Posts
    272
    Thanks
    63
    Thanked 1 Time in 1 Post
    i found out that it's inserting it into recent points but the the points value is blank, i might know why. The affiliates are trying to award CASH instead of points, and I cant use decimals in my points system, is there a way to get rid of the decimal? Also, how would i make it so capitalization doesnt matter?
    Last edited by markman641; 08-23-2011 at 05:28 AM.

  • #5
    Regular Coder
    Join Date
    Jul 2011
    Posts
    272
    Thanks
    63
    Thanked 1 Time in 1 Post
    Can you please tell me if i worked out the rounding and rate everything right:

    Code:
    <?
    include ("config.php");
    
    //here we will use get variables. 
    $snuid = $_GET['yti'];
    $campid = $_GET['campaignid'];
    $decimal = $_GET['rate'];
    $ip = $_SERVER['REMOTE_ADDR'];
    $sts = $_GET['credit'];
    
    <?php
    
    $first_number = $decimal;
    $second_number = 100;
    $unrounded = $second_number * $first_number;
    
    ?>
    
    
    <?php
    
    $first_number = $unrounded;
    $second_number = .70;
    $unroundedrate = $second_number * $first_number;
    
    ?>
    
    <?php 
    
    $rate = floor($unroundedrate);
    
     ?> 
    
    
    if ($ip == "174.120.27.187" || "174.120.146.43" && $sts="1")
    {
    //INSERT LOGIC TO CREDIT POINTS TO USERS
    mysql_query("UPDATE members SET pokerpoints=pokerpoints+".$rate." WHERE username='".$snuid."'");
    mysql_query("UPDATE members SET totalpointsearned=totalpointsearned+".$rate." WHERE username='".$snuid."'");
    mysql_query("INSERT into recentpoints (message) VALUES ('$snuid has just cashed out for $rate Bankroll Bucks')");
    mysql_close();
    }
    else
    {
    	die ("query failed");
    }
    ?>

  • #6
    Regular Coder
    Join Date
    Jul 2011
    Posts
    272
    Thanks
    63
    Thanked 1 Time in 1 Post
    I messed with my script too much, now its not even updating the recentpoints


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •