Web Analytics Made Easy -
StatCounter Postback script GPT - CodingForum

Announcement

Collapse
No announcement yet.

Postback script GPT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.
    Ever want to see inside of a rave? Check out RedRoll and join our community of EDM lovers and rave fanatics.

  • #2
    try deleting all the %'s

    $_GET['%yti%'];

    Comment


    • #3
      Didn't work.
      Ever want to see inside of a rave? Check out RedRoll and join our community of EDM lovers and rave fanatics.

      Comment


      • #4
        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; Aug 23, 2011, 12:28 AM.
        Ever want to see inside of a rave? Check out RedRoll and join our community of EDM lovers and rave fanatics.

        Comment


        • #5
          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");
          }
          ?>
          Ever want to see inside of a rave? Check out RedRoll and join our community of EDM lovers and rave fanatics.

          Comment


          • #6
            I messed with my script too much, now its not even updating the recentpoints
            Ever want to see inside of a rave? Check out RedRoll and join our community of EDM lovers and rave fanatics.

            Comment

            Working...
            X