Title: A little help (regarding a faucet) ? Post by: superiorus on April 06, 2015, 08:37:02 AM Hi
Someone can tell me if we can set a percent of the rewards ? (I mean to offer 1000 satoshi = 50% , 2000 satoshi = 30%, 3000 satoshi= 10%, 4000 satoshi= 9%, 5000 satoshi = 1%) it is just a example. Now I have : Quote // Array of 8 rewards in satoshis. 100,000,000 satoshis = 1 BTC // 1 mBTC = 100,000 Satoshis // 1 ?BTC (microbitcoin) = 100 Satoshis $rewards = array(1000, 2000, 3000, 4000, 5000); $minReward = min($rewards); $maxReward = max($rewards);] The source code for the faucet : https://gitorious.org/elbandi/minifaucet The file where the rewards are set is : config.php Thank you Title: Re: A little help (regarding a faucet) ? Post by: superiorus on April 06, 2015, 11:24:23 AM could this be a solution ?
Quote // Each reward entry is in the follwing format: array_fill(0,WEIGHT,REWARD) where WEIGHT is how frequently you want the REWARD to occur. $rewards = array_merge(array_fill(0,1,500), array_fill(0,10,200), array_fill(0,100,150), array_fill(0,100,100), array_fill(0,50,75), array_fill(0,50,50), array_fill(0,25,25), array_fill(0,20,10) ); Title: Re: A little help (regarding a faucet) ? Post by: niktitan132 on April 06, 2015, 11:39:07 AM could this be a solution ? Quote // Each reward entry is in the follwing format: array_fill(0,WEIGHT,REWARD) where WEIGHT is how frequently you want the REWARD to occur. $rewards = array_merge(array_fill(0,1,500), array_fill(0,10,200), array_fill(0,100,150), array_fill(0,100,100), array_fill(0,50,75), array_fill(0,50,50), array_fill(0,25,25), array_fill(0,20,10) ); Yes, this is the solution.Replace in the first code $rewards = array(1000, 2000, 3000, 4000, 5000); with that other $rewards = .... code.It should work. Title: Re: A little help (regarding a faucet) ? Post by: superiorus on April 06, 2015, 11:47:00 AM could this be a solution ? Quote // Each reward entry is in the follwing format: array_fill(0,WEIGHT,REWARD) where WEIGHT is how frequently you want the REWARD to occur. $rewards = array_merge(array_fill(0,1,500), array_fill(0,10,200), array_fill(0,100,150), array_fill(0,100,100), array_fill(0,50,75), array_fill(0,50,50), array_fill(0,25,25), array_fill(0,20,10) ); Yes, this is the solution.Replace in the first code $rewards = array(1000, 2000, 3000, 4000, 5000); with that other $rewards = .... code.It should work. Thank you @niktitan132 A dumb question maybe ... what is "0" in this case ? Title: Re: A little help (regarding a faucet) ? Post by: emrebey on April 06, 2015, 12:11:10 PM A dumb question maybe ... what is "0" in this case ? http://php.net/array_fill zero is the start index. Title: Re: A little help (regarding a faucet) ? Post by: superiorus on April 06, 2015, 01:21:53 PM One more question :
the max. value for "WEIGHT" must be 100 ? or could be 500 for example ? Title: Re: A little help (regarding a faucet) ? Post by: emrebey on April 06, 2015, 06:56:52 PM One more question : the max. value for "WEIGHT" must be 100 ? or could be 500 for example ? there is no max. you can set whatever you want but beware more value means that the possibility of related reward will raise too. Title: Re: A little help (regarding a faucet) ? Post by: superiorus on April 07, 2015, 08:09:50 AM I see a error when I click "Update server balance" from admin panel : Balance is not updated or balance is empty
But I have enough btc in my blockchain wallet. Title: Re: A little help (regarding a faucet) ? Post by: superiorus on April 07, 2015, 12:23:25 PM UPDATE :
somebody can help me to fix this issue ? i offer a nice bounty for a solution. |