Pages:
Author

Topic: Add-on for FaucetBOX Script: Rewards will be changed with Bitcoin price (Auto) (Read 2216 times)

hero member
Activity: 1078
Merit: 500
Pmed you!
replied... Smiley Smiley Smiley

Wow mate, you are on a roll, Faucethub conversion, URL shortener, and now rewards based on bitcoin fluctuation. Your progressiveness is definitely worth a kudos, when you started your faucet, thought just another random faucet admin, now really awesome, you are grasping coding at a good pace and implementing it for the faucet community, keep it up bro Smiley
Thanks a lot bro for your kind words... Smiley Smiley Smiley I'm newbie in coding, just a few days of learning... I desire when I'll become an well experienced developer, this community will get a lot of things from me...
legendary
Activity: 1470
Merit: 1079
Wow mate, you are on a roll, Faucethub conversion, URL shortener, and now rewards based on bitcoin fluctuation. Your progressiveness is definitely worth a kudos, when you started your faucet, thought just another random faucet admin, now really awesome, you are grasping coding at a good pace and implementing it for the faucet community, keep it up bro Smiley
sr. member
Activity: 650
Merit: 350
NOBT - WNOBT your saving bank◕◡◕
hero member
Activity: 1078
Merit: 500
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
I have followed your guide but rewards not shown up on my faucet page!
Make sure you have understood step 2 and 3. Tell me what you have done.

I did what your guide saying.

I aren't sure about your problem because some faucets are already using it without any problem, such as http://faucetmega.com
Will you please tell me about your script? Or send me your script and I'll do it for you.
My faucet topic https://bitcointalksearch.org/topic/m.17551218
there are two faucet script on this faucet one of them is faucetinbox script, I test your add-on at efaucet page as this is faucetinbox script.
Seems, you have issues with .htaccess file. Allow rs.php file to be accessed or just use this code in your /templates/default/index.php file.
Find:
Code:
echo $data["rewards"]; ?>
Replace with:
Code:
     $get_rate file_get_contents("https://blockchain.info/tobtc?currency=USD&value=1");
     
$rate $get_rate 100000000;
     
$reward1 intval($rate 0.001); // your first reward in USD
     
$reward2 intval($rate 0.0025); // your second reward in USD
     
$reward3 intval($rate 0.005); // your third reward in USD
     
echo "$reward1 , $reward2 , $reward3";
?>
Note: That's just an alternate of rs.php
I have followed this guide but rewards shown up on my faucet page are 0 , 0 , 0 , 0 , 0 satoshi every 1440 minutes!
do I need to replace Chance (in %) or so?
okay, send me your script and I will do it for you.
Do you mean script itself or FTP login?
script itself.
sr. member
Activity: 650
Merit: 350
NOBT - WNOBT your saving bank◕◡◕
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
I have followed your guide but rewards not shown up on my faucet page!
Make sure you have understood step 2 and 3. Tell me what you have done.

I did what your guide saying.

I aren't sure about your problem because some faucets are already using it without any problem, such as http://faucetmega.com
Will you please tell me about your script? Or send me your script and I'll do it for you.
My faucet topic https://bitcointalksearch.org/topic/m.17551218
there are two faucet script on this faucet one of them is faucetinbox script, I test your add-on at efaucet page as this is faucetinbox script.
Seems, you have issues with .htaccess file. Allow rs.php file to be accessed or just use this code in your /templates/default/index.php file.
Find:
Code:
echo $data["rewards"]; ?>
Replace with:
Code:
     $get_rate file_get_contents("https://blockchain.info/tobtc?currency=USD&value=1");
     
$rate $get_rate 100000000;
     
$reward1 intval($rate 0.001); // your first reward in USD
     
$reward2 intval($rate 0.0025); // your second reward in USD
     
$reward3 intval($rate 0.005); // your third reward in USD
     
echo "$reward1 , $reward2 , $reward3";
?>
Note: That's just an alternate of rs.php
I have followed this guide but rewards shown up on my faucet page are 0 , 0 , 0 , 0 , 0 satoshi every 1440 minutes!
do I need to replace Chance (in %) or so?
okay, send me your script and I will do it for you.
Do you mean script itself or FTP login?
hero member
Activity: 1078
Merit: 500
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
I have followed your guide but rewards not shown up on my faucet page!
Make sure you have understood step 2 and 3. Tell me what you have done.

I did what your guide saying.

I aren't sure about your problem because some faucets are already using it without any problem, such as http://faucetmega.com
Will you please tell me about your script? Or send me your script and I'll do it for you.
My faucet topic https://bitcointalksearch.org/topic/m.17551218
there are two faucet script on this faucet one of them is faucetinbox script, I test your add-on at efaucet page as this is faucetinbox script.
Seems, you have issues with .htaccess file. Allow rs.php file to be accessed or just use this code in your /templates/default/index.php file.
Find:
Code:
echo $data["rewards"]; ?>
Replace with:
Code:
     $get_rate file_get_contents("https://blockchain.info/tobtc?currency=USD&value=1");
     
$rate $get_rate 100000000;
     
$reward1 intval($rate 0.001); // your first reward in USD
     
$reward2 intval($rate 0.0025); // your second reward in USD
     
$reward3 intval($rate 0.005); // your third reward in USD
     
echo "$reward1 , $reward2 , $reward3";
?>
Note: That's just an alternate of rs.php
I have followed this guide but rewards shown up on my faucet page are 0 , 0 , 0 , 0 , 0 satoshi every 1440 minutes!
do I need to replace Chance (in %) or so?
okay, send me your script and I will do it for you.
sr. member
Activity: 650
Merit: 350
NOBT - WNOBT your saving bank◕◡◕
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
I have followed your guide but rewards not shown up on my faucet page!
Make sure you have understood step 2 and 3. Tell me what you have done.

I did what your guide saying.

I aren't sure about your problem because some faucets are already using it without any problem, such as http://faucetmega.com
Will you please tell me about your script? Or send me your script and I'll do it for you.
My faucet topic https://bitcointalksearch.org/topic/m.17551218
there are two faucet script on this faucet one of them is faucetinbox script, I test your add-on at efaucet page as this is faucetinbox script.
Seems, you have issues with .htaccess file. Allow rs.php file to be accessed or just use this code in your /templates/default/index.php file.
Find:
Code:
echo $data["rewards"]; ?>
Replace with:
Code:
     $get_rate file_get_contents("https://blockchain.info/tobtc?currency=USD&value=1");
     
$rate $get_rate 100000000;
     
$reward1 intval($rate 0.001); // your first reward in USD
     
$reward2 intval($rate 0.0025); // your second reward in USD
     
$reward3 intval($rate 0.005); // your third reward in USD
     
echo "$reward1 , $reward2 , $reward3";
?>
Note: That's just an alternate of rs.php
I have followed this guide but rewards shown up on my faucet page are 0 , 0 , 0 , 0 , 0 satoshi every 1440 minutes!
do I need to replace Chance (in %) or so?
hero member
Activity: 1078
Merit: 500
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
I have followed your guide but rewards not shown up on my faucet page!
Make sure you have understood step 2 and 3. Tell me what you have done.

I did what your guide saying.

I aren't sure about your problem because some faucets are already using it without any problem, such as http://faucetmega.com
Will you please tell me about your script? Or send me your script and I'll do it for you.
My faucet topic https://bitcointalksearch.org/topic/m.17551218
there are two faucet script on this faucet one of them is faucetinbox script, I test your add-on at efaucet page as this is faucetinbox script.
Seems, you have issues with .htaccess file. Allow rs.php file to be accessed or just use this code in your /templates/default/index.php file.
Find:
Code:
echo $data["rewards"]; ?>
Replace with:
Code:
     $get_rate file_get_contents("https://blockchain.info/tobtc?currency=USD&value=1");
     
$rate $get_rate 100000000;
     
$reward1 intval($rate 0.001); // your first reward in USD
     
$reward2 intval($rate 0.0025); // your second reward in USD
     
$reward3 intval($rate 0.005); // your third reward in USD
     
echo "$reward1 , $reward2 , $reward3";
?>
Note: That's just an alternate of rs.php
sr. member
Activity: 650
Merit: 350
NOBT - WNOBT your saving bank◕◡◕
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
I have followed your guide but rewards not shown up on my faucet page!
Make sure you have understood step 2 and 3. Tell me what you have done.

I did what your guide saying.

I aren't sure about your problem because some faucets are already using it without any problem, such as http://faucetmega.com
Will you please tell me about your script? Or send me your script and I'll do it for you.
My faucet topic https://bitcointalksearch.org/topic/m.17551218
there are two faucet script on this faucet one of them is faucetinbox script, I test your add-on at efaucet page as this is faucetinbox script.
hero member
Activity: 1078
Merit: 500
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
I have followed your guide but rewards not shown up on my faucet page!
Make sure you have understood step 2 and 3. Tell me what you have done.

I did what your guide saying.

I aren't sure about your problem because some faucets are already using it without any problem, such as http://faucetmega.com
Will you please tell me about your script? Or send me your script and I'll do it for you.
sr. member
Activity: 650
Merit: 350
NOBT - WNOBT your saving bank◕◡◕
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
I have followed your guide but rewards not shown up on my faucet page!
Make sure you have understood step 2 and 3. Tell me what you have done.

I did what your guide saying.
hero member
Activity: 1078
Merit: 500
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
I have followed your guide but rewards not shown up on my faucet page!
Make sure you have understood step 2 and 3. Tell me what you have done.
sr. member
Activity: 650
Merit: 350
NOBT - WNOBT your saving bank◕◡◕
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
I have followed your guide but rewards not shown up on my faucet page!
hero member
Activity: 1078
Merit: 500
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
thank you. just follow the guides above for it.
sr. member
Activity: 650
Merit: 350
NOBT - WNOBT your saving bank◕◡◕
Great work mate Smiley but how we can shown rewards as BTC like Rewards on Freebitco.in faucet and Rewards will be changed automatically according to bitcoin price?
hero member
Activity: 1078
Merit: 500
Good add-on for faucetinbox script and of course for faucet owner as well.
thank you... Smiley Smiley Smiley
legendary
Activity: 1523
Merit: 1001
NOBT - WNOBT your saving bank◕◡◕
 Good add-on for faucetinbox script and of course for faucet owner as well.
hero member
Activity: 1078
Merit: 500
I have been playing around for option for alt coins, so far i know cryptonator is the only free option that supports all coins from FB script.

Same instructions as in OP

Code:
   if ($this->currency === "LTC") {
            $api = "https://api.cryptonator.com/api/full/ltc-usd";
            $json = file_get_contents($api);
            $data = json_decode($json, true);
            $get_rate = $data["ticker"]["price"];
            $amount1 = number_format($get_rate, 8);
            $amount2 = number_format(1 / $amount1, 8);
            $rate = $amount2 * 100000000;
            $amount = intval($amount * $rate);
        }

Above is Litecoin example, replace "LTC" and "ltc-usd" in second line with the coin/currency you need.

So far no issues, amount1 and 2 could probably get improved with one line tho.

Thanks to OP for most of the work and idea in the first place Smiley
bah, thank you for providing codes for alt coin. this will help faucet owners who have alt coin faucet. Smiley
I am also using cryptonator in my exchanger: http://micro-exchanger.info . I think it's the best option.
full member
Activity: 223
Merit: 103
I have been playing around for option for alt coins, so far i know cryptonator is the only free option that supports all coins from FB script.

Same instructions as in OP

Code:
   if ($this->currency === "LTC") {
            $api = "https://api.cryptonator.com/api/full/ltc-usd";
            $json = file_get_contents($api);
            $data = json_decode($json, true);
            $get_rate = $data["ticker"]["price"];
            $amount1 = number_format($get_rate, 8);
            $amount2 = number_format(1 / $amount1, 8);
            $rate = $amount2 * 100000000;
            $amount = intval($amount * $rate);
        }

Above is Litecoin example, replace "LTC" and "ltc-usd" in second line with the coin/currency you need.

So far no issues, amount1 and 2 could probably get improved with one line tho.

Thanks to OP for most of the work and idea in the first place Smiley
hero member
Activity: 1078
Merit: 500
Testing it on https://btcforeveryone.xyz Smiley

Thanks!
Quote
have you done your testing?

Hello , will leave it for the rest of day if any errors show up Smiley
Btw is it possible to use with random rewards, ie 0.01-0.05?
$reward =rand(0.01,0.05);
or follow felicita's code

Thanks, it slipped past me Smiley
Just use random function. tungaqhd and felicita has already given example. Let me know if you need any help.
Pages:
Jump to: