Post
Topic
Board Micro Earnings
Re: FaucetBOX.com Discussion
by
minifrij
on 02/04/2016, 17:28:43 UTC
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:
Code:
$countryCode = json_decode(file_get_contents('http://geoip.nekudo.com/api/' . getIP()))->country->code;