After this post:
https://bitcointalk.org/index.php?topic=1838228.0Someone told me to add this feature on dice script.
It's very easy to add this feature in dice script.
Just open
index.php file from root directory.
Find:$startBal = 50; //starting balance for users
$reefAmount = 5; //referral amount
Replace with this code:$faucet_reward = 0.001; //reward amount in USD
$ref_amount = 0.0001; //referral amount in USD
$get_rate = file_get_contents("https://blockchain.info/tobtc?currency=USD&value=1");
$rate_sats = $get_rate * 100000000;
$startBal = intval($faucet_reward * $rate_sats);
$reefAmount = intval($ref_amount * $rate_sats);
Edit:So, here's the code for random rewards:
$min_reward = 0.001; //minimum faucet reward in USD
$max_reward = 0.005; //maximum faucet reward in USD
$ref_prcnt = 0.05; //referral percentage divided by 100.
$get_rate = file_get_contents("https://blockchain.info/tobtc?currency=USD&value=1");
$rate_sats = $get_rate * 100000000;
$shw_min = intval($min_reward * $rate_sats);
$shw_max = intval($max_reward * $rate_sats);
$reward = rand($shw_min, $shw_max);
$startBal = intval($reward);
$reefAmount = intval($ref_prcnt * $startBal);
Now paste this code anywhere inside
<body> </body> tag to show the rewards:
<?php echo "Win between $shw_min and $shw_max Satoshi every xxx minutes."; ?>
That's it. Now your dice is ready to change the reward amount according to the change of bitcoin price, just like freebitco.in.
![Wink](https://bitcointalk.org/Smileys/default/wink.gif)