...

View Full Version : Postback script GPT



markman641
08-23-2011, 01:38 AM
Hello, i have the following 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.

Nightfire
08-23-2011, 02:35 AM
try deleting all the %'s

$_GET['%yti%'];

markman641
08-23-2011, 06:18 AM
Didn't work.

markman641
08-23-2011, 06:21 AM
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?

markman641
08-23-2011, 06:42 AM
Can you please tell me if i worked out the rounding and rate everything right:


<?
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");
}
?>

markman641
08-23-2011, 06:59 AM
I messed with my script too much, now its not even updating the recentpoints



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum