Bitcoin Forum
April 28, 2024, 12:39:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 [67] 68 69 70 71 72 73 74 »
  Print  
Author Topic: [ANN] FaucetBOX.com - API & faucet script, create your own crypto faucet  (Read 119977 times)
minifrij
Legendary
*
Offline Offline

Activity: 2324
Merit: 1267


In Memory of Zepher


View Profile WWW
May 26, 2015, 08:28:16 PM
 #1321

For the timed button in combination with the adblock script shown above, you just have to put this script in the <span id = 'subbtn'></span> tags.

Code:
<a href="" class="btn btn-success disabled">Wait 5s.</a>

<script>
var count = 5; //This is the time you want before the button is clickable
var counter=setInterval(timer, 1000);

function timer(){
count=count-1;

if(count != 0){
document.getElementById("subbtn").innerHTML="<a href='' class='btn btn-success disabled'>Wait "+count+"s.</a>";
}else if(count == 0){
clearInterval(counter);
document.getElementById("timer").innerHTML="<input type = 'submit' class='btn btn-success' value = 'Claim Reward!'/>";
}
}
</script>

Then with the adblock script below as shown in the example above.
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714264788
Hero Member
*
Offline Offline

Posts: 1714264788

View Profile Personal Message (Offline)

Ignore
1714264788
Reply with quote  #2

1714264788
Report to moderator
Butord
Member
**
Offline Offline

Activity: 95
Merit: 10


View Profile
May 26, 2015, 08:38:48 PM
 #1322

For the timed button in combination with the adblock script shown above, you just have to put this script in the <span id = 'subbtn'></span> tags.

Code:
<a href="" class="btn btn-success disabled">Wait 5s.</a>

<script>
var count = 5; //This is the time you want before the button is clickable
var counter=setInterval(timer, 1000);

function timer(){
count=count-1;

if(count != 0){
document.getElementById("subbtn").innerHTML="<a href='' class='btn btn-success disabled'>Wait "+count+"s.</a>";
}else if(count == 0){
clearInterval(counter);
document.getElementById("timer").innerHTML="<input type = 'submit' class='btn btn-success' value = 'Claim Reward!'/>";
}
}
</script>

Then with the adblock script below as shown in the example above.
So the whole code will be like that?
Code:
<span id = 'subbtn'>
        <a href="" class="btn btn-success disabled">Wait 5s.</a>

<script>
var count = 5; //This is the time you want before the button is clickable
var counter=setInterval(timer, 1000);

function timer(){
count=count-1;

if(count != 0){
document.getElementById("subbtn").innerHTML="<a href='' class='btn btn-success disabled'>Wait "+count+"s.</a>";
}else if(count == 0){
clearInterval(counter);
document.getElementById("timer").innerHTML="<input type = 'submit' class='btn btn-success' value = 'Claim Reward!'/>";
}
}
</script>
</span>
<!--Check For Adblock-->
<script>
if(window.canRunAds === undefined){
   document.getElementById('subbtn').innerHTML = '<big>Please disable adblock to claim.Пoжaлyйcтa, oтключитe Adblock, чтoбы coбpaть caтoши</big>';
}
</script>
minifrij
Legendary
*
Offline Offline

Activity: 2324
Merit: 1267


In Memory of Zepher


View Profile WWW
May 26, 2015, 08:57:45 PM
 #1323

So the whole code will be like that?
snip
I made an error, here is the entire code:
Code:
<span id = 'subbtn'>
        <a href="" class="btn btn-success disabled">Wait 5s.</a>

        <script>
        var count = 5; //This is the time you want before the button is clickable
        var counter=setInterval(timer, 1000);

        function timer(){
        count=count-1;

        if(count != 0){
        document.getElementById("subbtn").innerHTML="<a href='' class='btn btn-success disabled'>Wait "+count+"s.</a>";
        }else if(count == 0){
        clearInterval(counter);
        document.getElementById("subbtn").innerHTML="<input type = 'submit' class='btn btn-success' value = 'Claim Reward!'/>";
        }
        }
        </script>
</span>
<!--Check For Adblock-->
<script>
if(window.canRunAds === undefined){
   document.getElementById('subbtn').innerHTML = '<big>Please disable adblock to claim.Пoжaлyйcтa, oтключитe Adblock, чтoбы coбpaть caтoши</big>';
}
</script>
This should be correct.
yvesp110
Hero Member
*****
Offline Offline

Activity: 1092
Merit: 501


View Profile
May 27, 2015, 03:40:24 AM
Last edit: May 27, 2015, 05:28:33 AM by yvesp110
 #1324

no worry man I am looking into api to do direct deposit into accounts.  I like Faucetbox but if they are gonna authorize scammers like him I rather not be part of it.  He scams people, advertisers and other faucet owner like he is gonna get rich with a faucet lol he will if he keeps scamming like he is but hey i move on and
I wouldn't blame FaucetBox for any actions of anyone else. If his site works correctly and is not trapping users it is none of FaucetBox's concern what else he does.

If you need any help send me a PM, APIs like blockchain.info are fairly easy to use.

No worry was not blamming Kazuldur nor Faucetbox on that matter is just a faucet like that keeps ignoring rules comes on then redo it then on wow a rollercoaster just pisses off users and they think all faucets on that payout are like that one.  But I saw he used all his chances. I will keep my faucets on but working on better high paying faucets but those will be direct into wallets.  well techs r working on it should be done when I am back from sick leave anyway and also will give themn access to funds using xapo also i see my faucets r dry and nothing i can do till i am home

and mini yes once faucet ready they may contact u here on how to do it direct api and put in also faucetbox for those who wants it like that but want be liste on there
minifrij
Legendary
*
Offline Offline

Activity: 2324
Merit: 1267


In Memory of Zepher


View Profile WWW
May 27, 2015, 12:49:07 PM
 #1325

Is there a reason why it takes so long to get approved? I've been waiting for 4 days now for my faucet to get approved, and I've been watching the faucets list for BTC, hasn't changed at all.

Thanks.

I know it says "up to a week" but from what I can tell, it's deliberately making me wait a week.
Because there's one or two people checking through hundreds of faucets to make sure they all work correctly and fit the ToS. That does take time.
joele
Legendary
*
Offline Offline

Activity: 1022
Merit: 1000



View Profile
May 27, 2015, 01:07:54 PM
 #1326

Is there a reason why it takes so long to get approved? I've been waiting for 4 days now for my faucet to get approved, and I've been watching the faucets list for BTC, hasn't changed at all.

Thanks.

I know it says "up to a week" but from what I can tell, it's deliberately making me wait a week.

Maybe they are waiting if your faucet can survive in a couple of days.
vaibhavsingh
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile WWW
May 27, 2015, 01:18:32 PM
 #1327

I am having some problems in sending payments through your api. When i check the balance using json it returns everything all right. But when i send a payment or fetch the most recent payouts, it says -
{"status":414,"message":"Missing or invalid parameters."}

Please help ASAP.

minifrij
Legendary
*
Offline Offline

Activity: 2324
Merit: 1267


In Memory of Zepher


View Profile WWW
May 27, 2015, 01:22:53 PM
 #1328

I am having some problems in sending payments through your api. When i check the balance using json it returns everything all right. But when i send a payment or fetch the most recent payouts, it says -
{"status":414,"message":"Missing or invalid parameters."}

Please help ASAP.
What's the request you're sending?
vaibhavsingh
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile WWW
May 27, 2015, 01:56:34 PM
 #1329

I am having some problems in sending payments through your api. When i check the balance using json it returns everything all right. But when i send a payment or fetch the most recent payouts, it says -
{"status":414,"message":"Missing or invalid parameters."}

Please help ASAP.
What's the request you're sending?
I tried fetching balance-
$json_url = "https://faucetbox.com/api/v1/balance?api_key=APIKEY&currency=BTC";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);
$bal = $json_feed->balance;

This returns ok.

Then i try this -
$json_url = "https://faucetbox.com/api/v1/send?api_key=APIKEY&currency=BTC&to=$addr&amount=$cash";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);
$status = $json_feed->status;
if ($status == '200') {
echo'A payment of '.$cash.' has been sent to <a href="https://faucetbox.com/en/check/$addr">your faucetbox account</a>.<br>Thanks for using Bitcoin Play!<br>';

I get a return - {"status":414,"message":"Missing or invalid parameters."}
I also get this error when i try to fetch the last payouts.

minifrij
Legendary
*
Offline Offline

Activity: 2324
Merit: 1267


In Memory of Zepher


View Profile WWW
May 27, 2015, 02:04:17 PM
 #1330

Hrmm, alright ,thanks. I guess I gotta sit tight.

I remember back in January when I started with faucetbox approval was within a couple of hours.
I expect there were a lot less faucets to trawl through back in January since the service was only a few months old. And you might have caught Kazuldur when he was online.

I tried fetching balance-
$json_url = "https://faucetbox.com/api/v1/balance?api_key=APIKEY&currency=BTC";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);
$bal = $json_feed->balance;

This returns ok.

Then i try this -
$json_url = "https://faucetbox.com/api/v1/send?api_key=APIKEY&currency=BTC&to=$addr&amount=$cash";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);
$status = $json_feed->status;
if ($status == '200') {
echo'A payment of '.$cash.' has been sent to <a href="https://faucetbox.com/en/check/$addr">your faucetbox account</a>.<br>Thanks for using Bitcoin Play!<br>';

I get a return - {"status":414,"message":"Missing or invalid parameters."}
I also get this error when i try to fetch the last payouts.
You seem to have given me every request but the one that you're having trouble getting, unless it's sending the BTC which is giving you trouble.
If that is not the case, when trying to get the last payouts what request do you send?
vaibhavsingh
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile WWW
May 27, 2015, 02:10:14 PM
 #1331

You seem to have given me every request but the one that you're having trouble getting, unless it's sending the BTC which is giving you trouble.
If that is not the case, when trying to get the last payouts what request do you send?

https://faucetbox.com/api/v1/send?api_key=APIKEY&amount=1000&to=BITCOINADDRESS&currency=BTC&referral=false

If i go to the above url(after adding api key and bitcoin address), the page shows -
{"status":414,"message":"Missing or invalid parameters."}

Vortex20000
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500

sucker got hacked and screwed --Toad


View Profile WWW
May 27, 2015, 02:12:26 PM
 #1332

I am having some problems in sending payments through your api. When i check the balance using json it returns everything all right. But when i send a payment or fetch the most recent payouts, it says -
{"status":414,"message":"Missing or invalid parameters."}

Please help ASAP.
What's the request you're sending?
I tried fetching balance-
$json_url = "https://faucetbox.com/api/v1/balance?api_key=APIKEY&currency=BTC";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);
$bal = $json_feed->balance;

This returns ok.

Then i try this -
$json_url = "https://faucetbox.com/api/v1/send?api_key=APIKEY&currency=BTC&to=$addr&amount=$cash";
$json_data = file_get_contents($json_url);
$json_feed = json_decode($json_data);
$status = $json_feed->status;
if ($status == '200') {
echo'A payment of '.$cash.' has been sent to <a href="https://faucetbox.com/en/check/$addr">your faucetbox account</a>.<br>Thanks for using Bitcoin Play!<br>';

I get a return - {"status":414,"message":"Missing or invalid parameters."}
I also get this error when i try to fetch the last payouts.
Use the official, pre-packaged api class. It makes life much, much easier.

Kazuldur (OP)
Legendary
*
Offline Offline

Activity: 971
Merit: 1000


View Profile
May 27, 2015, 02:12:55 PM
 #1333

You seem to have given me every request but the one that you're having trouble getting, unless it's sending the BTC which is giving you trouble.
If that is not the case, when trying to get the last payouts what request do you send?

https://faucetbox.com/api/v1/send?api_key=APIKEY&amount=1000&to=BITCOINADDRESS&currency=BTC&referral=false

If i go to the above url(after adding api key and bitcoin address), the page shows -
{"status":414,"message":"Missing or invalid parameters."}

That's a GET request. You have to do POST requests.

Is there a reason why it takes so long to get approved? I've been waiting for 4 days now for my faucet to get approved, and I've been watching the faucets list for BTC, hasn't changed at all.

Thanks.

I know it says "up to a week" but from what I can tell, it's deliberately making me wait a week.
Because there's one or two people checking through hundreds of faucets to make sure they all work correctly and fit the ToS. That does take time.

There's one person and he's been busy with other things lately. I believe he'll review pending faucets tomorrow.

Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
vaibhavsingh
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile WWW
May 27, 2015, 02:17:36 PM
 #1334

That's a GET request. You have to do POST requests.

But it works for fetching the balance.(Thats what i was being confused with)
(Can you post here an example of sending payouts through post?)

Kazuldur (OP)
Legendary
*
Offline Offline

Activity: 971
Merit: 1000


View Profile
May 27, 2015, 02:40:39 PM
 #1335

That's a GET request. You have to do POST requests.

But it works for fetching the balance.(Thats what i was being confused with)
(Can you post here an example of sending payouts through post?)

It only works as a compatibility for Microfaucet (and what's more, it only works for Bitcoin). It's not documented and shouldn't be used.

Code:
 <?php
 $params 
= array(
     
"api_key" => "api_key",
     
"currency" => "BTC",
     
"amount" => 1,
     
"to" => "dest address"
 
);
 
$opts = array(
     
"http" => array(
         
"method" => "POST",
         
"header" => "Content-type: application/x-www-form-urlencoded\r\n",
         
"content" => http_build_query($params)
     )   
 );
 
$ctx stream_context_create($opts);
 
$fp fopen("https://faucetbox.com/api/v1/send"'rb'null$ctx);
 
$response stream_get_contents($fp);
 
fclose($fp);
 
var_dump($response);

Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
Butord
Member
**
Offline Offline

Activity: 95
Merit: 10


View Profile
May 27, 2015, 02:43:07 PM
 #1336

So the whole code will be like that?
snip
I made an error, here is the entire code:
Code:
<span id = 'subbtn'>
        <a href="" class="btn btn-success disabled">Wait 5s.</a>

        <script>
        var count = 5; //This is the time you want before the button is clickable
        var counter=setInterval(timer, 1000);

        function timer(){
        count=count-1;

        if(count != 0){
        document.getElementById("subbtn").innerHTML="<a href='' class='btn btn-success disabled'>Wait "+count+"s.</a>";
        }else if(count == 0){
        clearInterval(counter);
        document.getElementById("subbtn").innerHTML="<input type = 'submit' class='btn btn-success' value = 'Claim Reward!'/>";
        }
        }
        </script>
</span>
<!--Check For Adblock-->
<script>
if(window.canRunAds === undefined){
   document.getElementById('subbtn').innerHTML = '<big>Please disable adblock to claim.Пoжaлyйcтa, oтключитe Adblock, чтoбы coбpaть caтoши</big>';
}
</script>
This should be correct.
It works but not as I want. When the adblock is enabled I see the message Please disable adblock to claim.Пoжaлyйcтa, oтключитe Adblock, чтoбы coбpaть caтoши but only 1 second or even less. After that I see the countdown button and after 5 sec the standart button Get reward appears. So actually script for adblock doesn't work
vaibhavsingh
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile WWW
May 27, 2015, 02:46:33 PM
 #1337

That's a GET request. You have to do POST requests.

But it works for fetching the balance.(Thats what i was being confused with)
(Can you post here an example of sending payouts through post?)

It only works as a compatibility for Microfaucet (and what's more, it only works for Bitcoin). It's not documented and shouldn't be used.

Code:
 <?php
 $params 
= array(
     
"api_key" => "api_key",
     
"currency" => "BTC",
     
"amount" => 1,
     
"to" => "dest address"
 
);
 
$opts = array(
     
"http" => array(
         
"method" => "POST",
         
"header" => "Content-type: application/x-www-form-urlencoded\r\n",
         
"content" => http_build_query($params)
     )   
 );
 
$ctx stream_context_create($opts);
 
$fp fopen("https://faucetbox.com/api/v1/send"'rb'null$ctx);
 
$response stream_get_contents($fp);
 
fclose($fp);
 
var_dump($response);

Kkk...
It works like a charm. Grin
One more thing, if i want to store the status(200 for ok) and message values in 2 php variables???

minifrij
Legendary
*
Offline Offline

Activity: 2324
Merit: 1267


In Memory of Zepher


View Profile WWW
May 27, 2015, 02:55:13 PM
 #1338

Kkk...
It works like a charm. Grin
One more thing, if i want to store the status(200 for ok) and message values in 2 php variables???
Code:
$jsonResponse = json_decode($response);
$status = $jsonResponse->status;
$message = $jsonResponse->otherJsonString;

It works but not as I want. When the adblock is enabled I see the message Please disable adblock to claim.Пoжaлyйcтa, oтключитe Adblock, чтoбы coбpaть caтoши but only 1 second or even less. After that I see the countdown button and after 5 sec the standart button Get reward appears. So actually script for adblock doesn't work
My apologies, I forgot a crucial part of it.

Try this:
Code:
<span id = 'subbtn'>
        <a href="" class="btn btn-success disabled">Wait 5s.</a>

        <script>
        var count = 5; //This is the time you want before the button is clickable
        if(window.canRunAds !== undefined){
                var counter=setInterval(timer, 1000);
        }

        function timer(){
        count=count-1;

        if(count != 0){
        document.getElementById("subbtn").innerHTML="<a href='' class='btn btn-success disabled'>Wait "+count+"s.</a>";
        }else if(count == 0){
        clearInterval(counter);
        document.getElementById("subbtn").innerHTML="<input type = 'submit' class='btn btn-success' value = 'Claim Reward!'/>";
        }
        }
        </script>
</span>
<!--Check For Adblock-->
<script>
if(window.canRunAds === undefined){
   document.getElementById('subbtn').innerHTML = '<big>Please disable adblock to claim.Пoжaлyйcтa, oтключитe Adblock, чтoбы coбpaть caтoши</big>';
}
</script>
vaibhavsingh
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile WWW
May 27, 2015, 03:00:52 PM
 #1339

Kkk...
It works like a charm. Grin
One more thing, if i want to store the status(200 for ok) and message values in 2 php variables???
Code:
$jsonResponse = json_decode($response);
$status = $jsonResponse->status;
$message = $jsonResponse->otherJsonString;
Returns only status and not the message. Sad Sad

minifrij
Legendary
*
Offline Offline

Activity: 2324
Merit: 1267


In Memory of Zepher


View Profile WWW
May 27, 2015, 03:06:45 PM
 #1340

Kkk...
It works like a charm. Grin
One more thing, if i want to store the status(200 for ok) and message values in 2 php variables???
Code:
$jsonResponse = json_decode($response);
$status = $jsonResponse->status;
$message = $jsonResponse->otherJsonString;
Returns only status and not the message. Sad Sad
otherJsonString is just a placeholder. I don't know which message you want to return, so you just put the string that you want to return in place of otherJsonString.
Pages: « 1 ... 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 [67] 68 69 70 71 72 73 74 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!