Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 06, 2016, 01:28:10 PM |
|
I setup a new faucet for the purpose of making micropayments for a giveaway. I was able to make payments but sometime I keep getting this error "There was an error while sending 15000 satoshi to "1DaG54To2jhE6MvGGuGq6qYRZmKQrEUZpw": This faucet made too many requests, try again later!" . How to fix this?
The IP address of your server (the one you have faucet on) or your FaucetBOX.com account exceeded the limit for API operations. From API docs: "There's a rate limit of 1000 requests per 10 minutes and 4000 requests per hour. If you need to make more requests, please contact our Support Team."
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
yambub
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 141
Merit: 11
Internet Freedom for African Communities
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 06, 2016, 02:57:57 PM |
|
Yes, it uses cURL, as listed in the requirements on https://faucetinabox.com/ . If it fails it'll try using PHP's fopen, but that detection of failure may not work properly on some hostings. You can set 'disable_curl' => true, in your config.php file to always use fopen, but I really recommend you to use cURL if possible. Thanks NeedIfFindIt and Kazuldur. Host says your IPs are not blocked. I tried installing a separate faucetinabox to test and that fails as well. Host says you may have blocked their IP, can you check? server IP is 82.221.129.20 It may well be blocked because they are a privacy-focussed ISP based in Iceland. They do VPSs among other things, so you might have their IP range blocked. I want to use faucetbox, hope you can help or I will have to figure out manual payments. Cheers Andy
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 06, 2016, 03:10:30 PM |
|
Yes, it uses cURL, as listed in the requirements on https://faucetinabox.com/ . If it fails it'll try using PHP's fopen, but that detection of failure may not work properly on some hostings. You can set 'disable_curl' => true, in your config.php file to always use fopen, but I really recommend you to use cURL if possible. Thanks NeedIfFindIt and Kazuldur. Host says your IPs are not blocked. I tried installing a separate faucetinabox to test and that fails as well. Host says you may have blocked their IP, can you check? server IP is 82.221.129.20 It may well be blocked because they are a privacy-focussed ISP based in Iceland. They do VPSs among other things, so you might have their IP range blocked. I want to use faucetbox, hope you can help or I will have to figure out manual payments. Cheers Andy It looks like you're guessing blindly and it may be something else entirely. What error do you see exactly? Set $display_errors = true; in your config.php file to see details.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
tyz
Legendary
Offline
Activity: 3360
Merit: 1533
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 12:39:35 PM |
|
Thinking about an idea to use the FaucetBox API for new projects. Are there any limitations to the content of the site where the API is used?
I mean, is it allowed to use Faucetbox on gambling or (legal) adult sites for example?
|
|
|
|
minifrij
Legendary
Offline
Activity: 2352
Merit: 1267
In Memory of Zepher
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 02:03:41 PM |
|
Thinking about an idea to use the FaucetBox API for new projects. Are there any limitations to the content of the site where the API is used?
I mean, is it allowed to use Faucetbox on gambling or (legal) adult sites for example?
After looking at the FaucetBOX Terms, I cannot see any restrictions or limitations as to what types of sites can use the API. AFAIK you should be fine to use the Micro Payment API on whatever you like.
|
|
|
|
yambub
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 141
Merit: 11
Internet Freedom for African Communities
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 04:41:09 PM |
|
It looks like you're guessing blindly and it may be something else entirely. What error do you see exactly? Set $display_errors = true; in your config.php file to see details.
You are probably right. I did what you said, here's the errors I am getting: Warning: fopen(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/friendsv/public_html/wp-content/plugins/99bitcoins-btc-faucet/libraries/faucetbox.php on line 31 Warning: fopen( https://faucetbox.com/api/v1/balance): failed to open stream: no suitable wrapper could be found in /home/friendsv/public_html/wp-content/plugins/99bitcoins-btc-faucet/libraries/faucetbox.php on line 31 Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /home/friendsv/public_html/wp-content/plugins/99bitcoins-btc-faucet/libraries/faucetbox.php on line 32 Warning: fclose() expects parameter 1 to be resource, boolean given in /home/friendsv/public_html/wp-content/plugins/99bitcoins-btc-faucet/libraries/faucetbox.php on line 36 Hope that makes progress possible, if you can interpret it for me, thanks Andy
|
|
|
|
Racey
Legendary
Offline
Activity: 1134
Merit: 1000
Soon, I have to go away.
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 04:59:23 PM |
|
^Yambub I went to a link on your post and seen this.
{"status":403,"message":"Invalid API key."}
|
And its gone.
|
|
|
yambub
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 141
Merit: 11
Internet Freedom for African Communities
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 05:06:13 PM |
|
^Yambub I went to a link on your post and seen this. {"status":403,"message":"Invalid API key."}
Thanks for looking Racey, I think that's just the link as it appears in the php file, It's showing as a link automatically but it shouldn't be, it's just part of the code. I tried putting it in code tags but the lines ran off the page so I put it in a quote tag instead. My bad.
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 05:12:04 PM |
|
It looks like you're guessing blindly and it may be something else entirely. What error do you see exactly? Set $display_errors = true; in your config.php file to see details.
You are probably right. I did what you said, here's the errors I am getting: Warning: fopen(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/friendsv/public_html/wp-content/plugins/99bitcoins-btc-faucet/libraries/faucetbox.php on line 31 Warning: fopen( https://faucetbox.com/api/v1/balance): failed to open stream: no suitable wrapper could be found in /home/friendsv/public_html/wp-content/plugins/99bitcoins-btc-faucet/libraries/faucetbox.php on line 31 Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /home/friendsv/public_html/wp-content/plugins/99bitcoins-btc-faucet/libraries/faucetbox.php on line 32 Warning: fclose() expects parameter 1 to be resource, boolean given in /home/friendsv/public_html/wp-content/plugins/99bitcoins-btc-faucet/libraries/faucetbox.php on line 36 Hope that makes progress possible, if you can interpret it for me, thanks Andy Your hosting disabled external HTTP(S) connections. Contact your hosting (you can send them the first line of logs you've quoted to make it clear for them what are you asking).
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
yambub
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 141
Merit: 11
Internet Freedom for African Communities
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 07:15:43 PM |
|
Your hosting disabled external HTTP(S) connections. Contact your hosting (you can send them the first line of logs you've quoted to make it clear for them what are you asking).
Hi, host says it should be using curl, but the script says $fp = fopen($this->api_base . $method, 'rb', null, $ctx); Can I just change it to curl or will that screw everything up? Thanks Andy
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 07:21:32 PM |
|
Your hosting disabled external HTTP(S) connections. Contact your hosting (you can send them the first line of logs you've quoted to make it clear for them what are you asking).
Hi, host says it should be using curl, but the script says $fp = fopen($this->api_base . $method, 'rb', null, $ctx); Can I just change it to curl or will that screw everything up? Thanks Andy It uses cURL by default, if you have 'disable_curl' => false, in your config.php file. It only fall backs to fopen if cURL fails.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
yambub
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 141
Merit: 11
Internet Freedom for African Communities
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 10:11:16 PM |
|
It uses cURL by default, if you have 'disable_curl' => false, in your config.php file. It only fall backs to fopen if cURL fails.
Thanks for your support on this. Do you know of an uncomplicated way I can test cURL on shared hosting, like "hello world" for cURL? Just to make sure? I've written to the host again.
|
|
|
|
andresem
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 10:38:16 PM |
|
what is this error when I enter an address into the field and click get Reward, page simply reload
|
|
|
|
minifrij
Legendary
Offline
Activity: 2352
Merit: 1267
In Memory of Zepher
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 09, 2016, 10:44:02 PM Last edit: October 10, 2016, 09:37:10 AM by minifrij |
|
Thanks for your support on this. Do you know of an uncomplicated way I can test cURL on shared hosting, like "hello world" for cURL? Just to make sure? I've written to the host again.
Providing that $disable_curl is equal to false in your config.php file, you could use a simple file like this in your main directory to call the FaucetBOX API and get the Balance. <?php require('config.php'); require('libs/faucetbox.php'); $apiKey = 'APIKEYHERE'; $faucetbox = new FaucetBOX($apiKey, 'BTC');
$balance = getBalance(); var_dump($balance); ?>
If you get something like this returned: {"status":200, "balance":77519999889, "balance_bitcoin":"775.19999889"} cURL works on your server. Otherwise, you will likely get a PHP error.
|
|
|
|
yambub
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 141
Merit: 11
Internet Freedom for African Communities
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 10, 2016, 03:56:52 PM |
|
It uses cURL by default, if you have 'disable_curl' => false, in your config.php file. It only fall backs to fopen if cURL fails.
Hi, I got a detailed response from level 3 support (wonder how many levels there are) which I hope will make more sense to you than to me: Hello, ...
What you sent us is just the class sheet, not what is actually fired first, he says cURL so that would be this functions
public function __execCURL($method, $params = array()) { $params = array_merge($params, array("api_key" => $this->api_key, "currency" => $this->currency));
$ch = curl_init($this->api_base . $method); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $params); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verify_peer); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch); if(!$response) { $response = $this->__execPHP($method, $params); } curl_close($ch);
return $response; } I can confirm this would work, but the other one "fopen fclose" it will not. cURL should work, if it fails it would give you a point of failure, see $response variable, it would give you a response, if we check your error_log in your public_html it yields this
[05-Oct-2016 19:46:08 UTC] PHP Parse error: syntax error, unexpected 'https' (T_STRING), expecting function (T_FUNCTION) in /home/friendsv/public_html/wp-content/plugins/99bitcoins-btc-faucet/libraries/faucetbox.php on line 16
It does show this because when you disabled cURL it returned the fopen is blocked message, but with cURL enabled it doesn't udnerstand the https t_string, ask them about this I can't see anything on line 16 that is abnormal myself. I would assume this would be why the cURL is not working. Is this any use? They are insisting cURL is working fine. I'm using the solvemedia api and that's working ok, and I installed the faucetinabox as a test, outside of WP and that didn't work. Thanks Andy
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 10, 2016, 04:32:03 PM |
|
Is this any use? They are insisting cURL is working fine. I'm using the solvemedia api and that's working ok, and I installed the faucetinabox as a test, outside of WP and that didn't work.
Thanks Andy
I would guess that they have really old OpenSSL, misconfigured CA certificates or CloudFlare doesn't like your hosting. Upload this to your server and send me a link to it: https://faucetinabox.com/static/download/tools/test.php
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
nipol
Newbie
Offline
Activity: 46
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 10, 2016, 06:42:36 PM |
|
Hello!
How to add faucetbox IP's to whitelist in CloudFlare? Which IP's I need to add?
Now when CloudFlare is active it blocks payments to users.
Thanks!
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 10, 2016, 06:56:04 PM |
|
Hello!
How to add faucetbox IP's to whitelist in CloudFlare? Which IP's I need to add?
Now when CloudFlare is active it blocks payments to users.
Thanks!
What you said doesn't make sense. If you started using CloudFlare for your faucet and payments to users stopped working then it's not related to FaucetBOX.com IPs in any way. How exactly are payments "blocked"? Do all users see a timer? Or maybe you're using NastyHosts and everyone is reported as "Banned" in your error log?
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
nipol
Newbie
Offline
Activity: 46
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 10, 2016, 07:10:31 PM |
|
Hello!
How to add faucetbox IP's to whitelist in CloudFlare? Which IP's I need to add?
Now when CloudFlare is active it blocks payments to users.
Thanks!
What you said doesn't make sense. If you started using CloudFlare for your faucet and payments to users stopped working then it's not related to FaucetBOX.com IPs in any way. How exactly are payments "blocked"? Do all users see a timer? Or maybe you're using NastyHosts and everyone is reported as "Banned" in your error log? I use your platform to make withdrawals for users. I use self made faucet that uses also your script to make withdrawals. Today I decided to use also a CF. When CF is off I can see hte payments and links from my site to admin interface in FB here: "Hosts that used your API key". When CF is on I can't see payments and links(((( - user's didn't receive payments ((( So I decided that is necessary to set your IP's in CF whitelist...
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
October 10, 2016, 07:19:35 PM |
|
I use your platform to make withdrawals for users. I use self made faucet that uses also your script to make withdrawals. Today I decided to use also a CF. When CF is off I can see hte payments and links from my site to admin interface in FB here: "Hosts that used your API key". When CF is on I can't see payments and links(((( - user's didn't receive payments ((( So I decided that is necessary to set your IP's in CF whitelist...
There's no place where your CloudFlare and FaucetBOX.com IPs interact, these are two different things. What errors do your users see exactly CF on? Do you see any errors (especially "Banned: x.x.x.x") in your web server's error log? I'm quite sure that you didn't configure Reverse Proxy properly in your Faucet in a BOX admin panel and no payments are made because it looks like all users are bots and aren't allowed to make payment. That has nothing to do with any whitelisting.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
|