Okay, so I simplified it a bit and tested it. So this PHP code actually works to make 1 bet (you can loop it yourself to auto-bet, just don't make a infinite loop lol.)
Notes:
- Only those who know PHP should use this. It's not a bot for all users or whatever.
- You have to get ajax key + cookies manually and put it there
- The plinko "rules" are just saved on server, so change it in browser on your account and just run script would work
- You could actually make 1 cURL command in terminal to make 1 bet - so that might be easier than PHP script
- Etc. etc. use on own risk :p
$ssl_ca = "/var/www/cacert.pem";
$url = "https://betterbets.io/ep/ajax/?func=placeBetPlinko&ajaxUserKey=";
$ajax_key = "yourajaxkey"; // NOT same as API key > get manually
function make_bet() {
global $url,$ajax_key,$ssl_ca;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url.$ajax_key);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// SSL stuff you can change 2 and 1 both to 0 and remove CAINFO if you don't care about verifying SSL
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_CAINFO, $ssl_ca);
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(array(
'pidx' => "2", // Green=0,Yellow=1,Red=2
'r' => "3", // Green=1,Yellow=2,Red=3
'ui' => "1",
'w' => "0.00000100" // Wager amount
))
);
// Change to your cookies
curl_setopt($ch, CURLOPT_COOKIE,"__cfduid=1; PHPSESSID=1; BetterBetsSession=1");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Requested-With: XMLHttpRequest','Referer: https://betterbets.io/app/game/plinko/'));
$server_output = curl_exec($ch);
if (empty($server_output)) {
die('broken');
} else {
$return = json_decode($server_output,true);
if (empty($return['profit'])) {
echo $server_output;
die('broken');
} else {
echo ''
;
print_r($return);
echo '';
return $return;
}
}
}
make_bet();
?>EDIT: Just to be clear, anyone who wants to make a
autobet bot should definitely
NOT do it in PHP lol. For example it's even easier to do it like this:
Let's say we want to bet 10 times on Yellow for 100 sats each:1. Press F12 while plinko game is open in browser
2. Go to "Console" tab
3. Enter the following command and press enter:
for(i=0;i<10;i++) { setTimeout(function(){ placeBetPlinko(1,0.00000100,2); }, 1000*i); }
4. Done.
Notes:
- The 0.00000100 is the amount
- To change colors: change 1 and 2 parameters at the placeBetPlinko function... Green=0+1, Yellow=1+2, Red=2+3
- I put a 1 second delay (1000ms) to not DoS the site
- You can change the 10 to slightly higher, but I recommend to not make it -too- high, just in case anything goes wrong
- Use at own risk