bustabit
a safe way to share your script without revealing the source code
----------------------------------for you (so you can update the bet amount for others using the script-----------------
//put this at the top of your script
function sharemybet(amount){
return httpGet('http://yoursite.com/better.php?cashout=' + amount + '&pass=lol');
}
function httpGet(theUrl)
{
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
//put this somewhere in your script that bets
sharemybet(114);
----------------------------------give this to the people you want to win with your script-----------------
function httpGet(theUrl)
{
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false );
xmlHttp.send( null );
return xmlHttp.responseText;
}
engine.on('game_starting', function(info) {
engine.placeBet(betInSatoshis, httpGet('http://yoursite.com/better.php'));
console.log('Game Starting in ' + info.time_till_start);
});
----------------------------------upload this to your website----------------------
<?php
//usage: http://yoursite.com/better.php?cashout=114&pass=lol
//edit here
$mypass = 'lol';
//end edit
$val = (int)$_GET['cashout='];
$pass = @$_GET['pass']
if (($val) && ($pass == $mypass)){
<?php
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
fwrite($myfile, $val);
fclose($myfile);
?>
}else{
$filename = "newfile.txt";
$handle = fopen($filename, "r");
echo fread($handle, filesize($filename));
fclose($handle);
}
?>