我对Adgate回发有问题,它没有记录回发。
我正在尝试将adgate添加到我的网站。因此,我创建了一个offerwall,并将回发设置为http://###########/global/pb/adgate.php?id={s1}&robux={points}
,其中s1
是用户ID。然后points
支付的金额。
这是我在adgate.php上的代码;
<?php
function postToDiscord($message)
{
$data = array("content" => $message, "username" => "Postback Bot");
$curl = curl_init("https://discordapp.com/api/webhooks/#################/###################################################");
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
return curl_exec($curl);
}
$servername = "localhost";
$username = "#######";
$password = "#######";
$dbname = "########";
$conn = new mysqli($servername, $username, $password, $dbname);
if (!isset($_GET['id'])) {
exit();
}
if (!isset($_GET['robux'])) {
exit();
}
$userid = $_GET['id'];
$payout = $_GET['robux'];
$sql = "SELECT id, username, balance FROM logs";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()) {
if ($userid == $row['id']) {
$currentbal = $row['balance'];
$user = $row['username'];
}
}
$newbal = $currentbal + $payout;
$sql = "UPDATE logs SET balance='$newbal' WHERE id=".$userid;
$conn->query($sql);
$money = round($payout/40, 2);
$msg = '
**NEW PAYOUT**
Username: '.$user.'
Payout: '.$payout.' R$
New balance: '.$newbal.' R$
Our earnings: '.$money.'$
--------------------';
postToDiscord($msg);
?>
当我自己尝试(通过回发)时,通过此url; http://###########/global/pb/adgate.php?id=1&robux=40
,它确实提供了我想要的结果,它进行了更新并将其放入不和谐的频道中。但是当我在网站上使用测试产品(测试模式)时。它应该直接发送回发,但不会更新或在Discord中发送消息。
谢谢