Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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);
- ?>
Add Comment
Please, Sign In to add comment