doulun5683 2017-01-24 08:59
浏览 14

回发脚本问题

Ive been really struggling to see the issue with my postback script,

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "";

$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 
//$adscendIp = "xx.xx.xx.xx"; // ip for adsc

//if($_SERVER['REMOTE_ADDR'] != $adscendIp)
//{
//die("Access Denied!");
//}

$campid = $_GET['campid']; // ID number of the campaign credited
$sid = $_GET['sid']; // The SubID that was passed in the campaign link
$rate = $_GET['rate']; // Commission earned (Will be negative if status is revoked)
$status = $_GET['status']; // Status of the lead. 1 for payable, 2 for revoked
$name = $_GET['name']; // Name of the campaign
$ip = $_GET['ip']; // IP address of the user 
$cur = $_GET['cur'];
$sb1 = $_GET['sb1'];

if($status == "1")
{

    mysqli_query($conn,"UPDATE users SET balance = '.$cur.' WHERE steamid = '.$sd1.'");

}
else
{
die("Revoked Lead!");
}
?>

Ive tried going to the link and putting the correct variables in the url and it seems to work, but when i try it on the offerwall its failing, is there anything you can see wrong with the script.

  • 写回答

1条回答 默认 最新

  • dtz33344 2017-01-24 09:09
    关注

    your all variable i.e campid, sid etc coming from any html form? then in that form set method post. & then in php code get all parameters with $_POST...

    $campid = $_POST['campid'];
    $sid = $_POST['sid']; 
    $rate = $_POST['rate']; 
    
    评论

报告相同问题?

悬赏问题

  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器