frogglenn
Newbie
Offline
Activity: 30
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 02, 2016, 04:12:38 PM |
|
Hi, freegeoip.net is no longer going to work stable. My question is what alternative can be used? I use geolocation to pay users.
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 02, 2016, 05:13:27 PM |
|
Hi, freegeoip.net is no longer going to work stable. My question is what alternative can be used? I use geolocation to pay users.
I believe CloudFlare can provide user's location in a custom HTTP header. Not only it will be stable, it'll also be much faster (as you won't need extra http request to external service).
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
minifrij
Legendary
Offline
Activity: 2352
Merit: 1267
In Memory of Zepher
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 02, 2016, 05:28:43 PM |
|
Hi, freegeoip.net is no longer going to work stable. My question is what alternative can be used? I use geolocation to pay users.
I believe CloudFlare can provide user's location in a custom HTTP header. Not only it will be stable, it'll also be much faster (as you won't need extra http request to external service). If this doesn't work for you, you can use the other geo-location service I mentioned a page back in this way: $countryCode = json_decode(file_get_contents('http://geoip.nekudo.com/api/' . getIP()))->country->code;
|
|
|
|
Salmen
Legendary
Offline
Activity: 1059
Merit: 1020
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 02, 2016, 07:25:44 PM |
|
Hi, freegeoip.net is no longer going to work stable. My question is what alternative can be used? I use geolocation to pay users.
I believe CloudFlare can provide user's location in a custom HTTP header. Not only it will be stable, it'll also be much faster (as you won't need extra http request to external service). If this doesn't work for you, you can use the other geo-location service I mentioned a page back in this way: $countryCode = json_decode(file_get_contents('http://geoip.nekudo.com/api/' . getIP()))->country->code;
I'm not sure but Remote addr won't work with cloudflare. I had the problem and it worked with x-forwarded for. Remote address return the ip of the cloudflare server. You may look hereI hope I can help you. Cheers Salmen
|
Young Developer amidst Europe. Specialized in Web Programming and Creating Telegram Bots. Looking for a developer? Feel free to drop a mail to me. Running JaguarBitcoin - Your Place For Scripts
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 02, 2016, 08:35:43 PM |
|
Hi, freegeoip.net is no longer going to work stable. My question is what alternative can be used? I use geolocation to pay users.
I believe CloudFlare can provide user's location in a custom HTTP header. Not only it will be stable, it'll also be much faster (as you won't need extra http request to external service). If this doesn't work for you, you can use the other geo-location service I mentioned a page back in this way: $countryCode = json_decode(file_get_contents('http://geoip.nekudo.com/api/' . getIP()))->country->code;
I'm not sure but Remote addr won't work with cloudflare. I had the problem and it worked with x-forwarded for. Remote address return the ip of the cloudflare server. You may look here minifrij's example uses getIP() which can handle that (and does that securely). The problem here isn't getting the IP itself, but getting the geographical location of user.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
Salmen
Legendary
Offline
Activity: 1059
Merit: 1020
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 02, 2016, 09:26:43 PM |
|
Hi, freegeoip.net is no longer going to work stable. My question is what alternative can be used? I use geolocation to pay users.
I believe CloudFlare can provide user's location in a custom HTTP header. Not only it will be stable, it'll also be much faster (as you won't need extra http request to external service). If this doesn't work for you, you can use the other geo-location service I mentioned a page back in this way: $countryCode = json_decode(file_get_contents('http://geoip.nekudo.com/api/' . getIP()))->country->code;
I'm not sure but Remote addr won't work with cloudflare. I had the problem and it worked with x-forwarded for. Remote address return the ip of the cloudflare server. You may look here minifrij's example uses getIP() which can handle that (and does that securely). The problem here isn't getting the IP itself, but getting the geographical location of user. Well, in one of my project I use to get the country of the user an with php function and an api. The PHP function (from here) function get_ip() { if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR']) { $ipList = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); $_SERVER['HTTP_X_FORWARDED_FOR'] = array_pop($ipList); } else { $_SERVER['HTTP_X_FORWARDED_FOR'] = false; } if (filter_var($_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { return $_SERVER['HTTP_X_FORWARDED_FOR']; } else { return $_SERVER['REMOTE_ADDR']; } return $_SERVER['REMOTE_ADDR']; }
And the PHP API $location = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.get_ip())); echo strtolower($location['geoplugin_countryCode']); // if you come from russian, you get: ru
It returns 'ru' if you are russian. The API works on my site although remote_addr don't work. The function checks if ip from $_SERVER['REMOTE_ADDR'] is valid, if not it get the IP from $_SERVER['HTTP_X_FORWARDED_FOR'].
|
Young Developer amidst Europe. Specialized in Web Programming and Creating Telegram Bots. Looking for a developer? Feel free to drop a mail to me. Running JaguarBitcoin - Your Place For Scripts
|
|
|
frogglenn
Newbie
Offline
Activity: 30
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 02, 2016, 10:14:01 PM |
|
Thank you for answering so quickly. I appreciate ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
alienmoney
Newbie
Offline
Activity: 45
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 07, 2016, 08:48:26 PM |
|
hi, when it will be available for ether faucet?
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 07, 2016, 08:56:44 PM |
|
hi, when it will be available for ether faucet? We don't plan it for a few more months at least.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
LaStOpTi0N
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 112
Merit: 10
★★SatoshiCollector.co.uk★★
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 09, 2016, 12:43:23 AM |
|
Hi, I saw some rotators around like this one Yoyobtcrotator.cf/index.htmlfrom which you can claim reward even if your ad-blocker is on.I 'm using faucetbox anti ad-blocker but nothing happens.You can claim easily & its a totally loss of faucet owners. So today i use meta tag to block my site using as an iframe but its not a solution.I will lose many visitors.Any suggestions to use and trigger anti ad-block script in rotators?
|
|
|
|
BitBustah
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 09, 2016, 08:27:55 AM |
|
Hi, I saw some rotators around like this one Yoyobtcrotator.cf/index.htmlfrom which you can claim reward even if your ad-blocker is on.I 'm using faucetbox anti ad-blocker but nothing happens.You can claim easily & its a totally loss of faucet owners. So today i use meta tag to block my site using as an iframe but its not a solution.I will lose many visitors.Any suggestions to use and trigger anti ad-block script in rotators? This works with a lot of adblockers (not all I guess). It shows a message but can easily be changed to hide the reward button. Between the <head> tags: <script type="text/javascript" src="showads.js"></script> Under the <body> tag: <script type="text/javascript"> if( window.canRunAds === undefined ){ document.writeln('Please disable your adblocker!'); } </script> The showads.js file is just a text file with this code:
|
|
|
|
kwaasteniet
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 09, 2016, 08:34:29 AM |
|
Give me some good reasons to use faucetbox instead of Xapo. I can't choose between them. Are their benefits above Xapo to use it?
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 09, 2016, 10:50:58 AM |
|
Hi, I saw some rotators around like this one Yoyobtcrotator.cf/index.htmlfrom which you can claim reward even if your ad-blocker is on.I 'm using faucetbox anti ad-blocker but nothing happens.You can claim easily & its a totally loss of faucet owners. So today i use meta tag to block my site using as an iframe but its not a solution.I will lose many visitors.Any suggestions to use and trigger anti ad-block script in rotators? This works with a lot of adblockers (not all I guess). It shows a message but can easily be changed to hide the reward button. Between the <head> tags: <script type="text/javascript" src="showads.js"></script> Under the <body> tag: <script type="text/javascript"> if( window.canRunAds === undefined ){ document.writeln('Please disable your adblocker!'); } </script> The showads.js file is just a text file with this code: That's exactly what builtin Faucet in a Box anti ad-blocker does.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
BitBustah
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 09, 2016, 11:13:05 AM |
|
Hi, I saw some rotators around like this one Yoyobtcrotator.cf/index.htmlfrom which you can claim reward even if your ad-blocker is on.I 'm using faucetbox anti ad-blocker but nothing happens.You can claim easily & its a totally loss of faucet owners. So today i use meta tag to block my site using as an iframe but its not a solution.I will lose many visitors.Any suggestions to use and trigger anti ad-block script in rotators? This works with a lot of adblockers (not all I guess). It shows a message but can easily be changed to hide the reward button. Between the <head> tags: <script type="text/javascript" src="showads.js"></script> Under the <body> tag: <script type="text/javascript"> if( window.canRunAds === undefined ){ document.writeln('Please disable your adblocker!'); } </script> The showads.js file is just a text file with this code: That's exactly what builtin Faucet in a Box anti ad-blocker does. Same code? Lol I redid that without looking at your code. ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif)
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 09, 2016, 11:17:01 AM |
|
Same code? Lol I redid that without looking at your code. ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif) Well, the file is named a little bit different and we insert an invisible DOM element instead of defining a variable and we only disable button instead of replacing whole page, but the principle is the same ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
ragi
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 13, 2016, 09:14:54 AM |
|
Something is wrong with the API. It goes down every 2/3 minutes for a bit.
|
no.
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 13, 2016, 01:53:43 PM |
|
Something is wrong with the API. It goes down every 2/3 minutes for a bit.
What errors do you see? EDIT: I don't see any errors in logs and our performance graph doesn't show any issues. Does it happen to others too?
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
ragi
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 13, 2016, 02:44:48 PM |
|
What errors do you see?
EDIT: I don't see any errors in logs and our performance graph doesn't show any issues. Does it happen to others too?
[13-Apr-2016 09:32:34 America/New_York] PHP Warning: fopen(): Couldn't resolve host name in /home/ihz/public_html/libs/faucetbox.php on line 46 [13-Apr-2016 09:32:34 America/New_York] PHP Warning: fopen(https://faucetbox.com/api/v1/send): failed to open stream: operation failed in /home/ihz/public_html/libs/faucetbox.php on line 46 [13-Apr-2016 09:32:34 America/New_York] PHP Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /home/ihz/public_html/libs/faucetbox.php on line 47 [13-Apr-2016 09:32:34 America/New_York] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /home/ihz/public_html/libs/faucetbox.php on line 51 [13-Apr-2016 09:33:48 America/New_York] PHP Warning: file_get_contents(): Couldn't resolve host name in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:33:48 America/New_York] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6Ld*****************0y98k6 in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:34:49 America/New_York] PHP Warning: file_get_contents(): Couldn't resolve host name in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:34:49 America/New_York] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6Ld********************vJI8xen4 in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:32 America/New_York] PHP Warning: file_get_contents(): Couldn't resolve host name in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:32 America/New_York] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6Ld***********************ip13 in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:44 America/New_York] PHP Warning: file_get_contents(): Couldn't resolve host name in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:44 America/New_York] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6Ldb************************AJ85m in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:58 America/New_York] PHP Warning: file_get_contents(): Couldn't resolve host name in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:58 America/New_York] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6L********************puoWZzJ in /home/ihz/public_html/index.php on line 2170
This is what I am getting, and my error log is becoming HUGE because of it. Everything was fine 2 days ago. EDIT: The faucet is working, and it sends payments and everything
|
no.
|
|
|
BitBustah
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 13, 2016, 03:47:23 PM |
|
What errors do you see?
EDIT: I don't see any errors in logs and our performance graph doesn't show any issues. Does it happen to others too?
[13-Apr-2016 09:32:34 America/New_York] PHP Warning: fopen(): Couldn't resolve host name in /home/ihz/public_html/libs/faucetbox.php on line 46 [13-Apr-2016 09:32:34 America/New_York] PHP Warning: fopen(https://faucetbox.com/api/v1/send): failed to open stream: operation failed in /home/ihz/public_html/libs/faucetbox.php on line 46 [13-Apr-2016 09:32:34 America/New_York] PHP Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /home/ihz/public_html/libs/faucetbox.php on line 47 [13-Apr-2016 09:32:34 America/New_York] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /home/ihz/public_html/libs/faucetbox.php on line 51 [13-Apr-2016 09:33:48 America/New_York] PHP Warning: file_get_contents(): Couldn't resolve host name in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:33:48 America/New_York] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6Ld*****************0y98k6 in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:34:49 America/New_York] PHP Warning: file_get_contents(): Couldn't resolve host name in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:34:49 America/New_York] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6Ld********************vJI8xen4 in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:32 America/New_York] PHP Warning: file_get_contents(): Couldn't resolve host name in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:32 America/New_York] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6Ld***********************ip13 in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:44 America/New_York] PHP Warning: file_get_contents(): Couldn't resolve host name in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:44 America/New_York] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6Ldb************************AJ85m in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:58 America/New_York] PHP Warning: file_get_contents(): Couldn't resolve host name in /home/ihz/public_html/index.php on line 2170 [13-Apr-2016 09:36:58 America/New_York] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6L********************puoWZzJ in /home/ihz/public_html/index.php on line 2170
This is what I am getting, and my error log is becoming HUGE because of it. Everything was fine 2 days ago. EDIT: The faucet is working, and it sends payments and everything I have it too from time to time. I ignore it. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
Kazuldur (OP)
Legendary
Offline
Activity: 971
Merit: 1000
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
April 13, 2016, 03:49:25 PM |
|
What errors do you see?
EDIT: I don't see any errors in logs and our performance graph doesn't show any issues. Does it happen to others too?
This is what I am getting, and my error log is becoming HUGE because of it. Everything was fine 2 days ago. EDIT: The faucet is working, and it sends payments and everything These aren't errors from FaucetBOX.com API. These errors indicate problems with connecting to the DNS nameserver your hosting is using, because: 1. there are errors about problems with connecting not only to FaucetBOX.com, but also to reCaptcha 2. the error is "Couldn't resolve host name", which means that it couldn't even translate faucetbox.com domain into IP address. Due to the way DNS works, it's not something that we are responsible for directly, so the problem must be somewhere on your side.
|
Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
|
|
|
|