freegeoip 403 Forbidden

1.7k Views Asked by At

I am using freegeoip to get geolocation of ip address for my client. Everything was working fine but all of sudden an error is showing on the site in the top area saying,

Severity: Warning Message: file_get_contents(http://freegeoip.net/json/39.37.152.1): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

when i look into the issue i found that the site hitting limit is exceed so that's why the error is showing.

This is my site http://www.acssynergy.com/ does any one has the idea that how long this error will keep showing it's been 24 hours and error is still there

1

There are 1 best solutions below

2
On

Currently if I check http://freegeoip.net/json/84.236.112.202

The result is:

ip  "84.236.112.202"
country_code    "HU"
country_name    "Hungary"
region_code "BU"
region_name "Budapest"
city    "Budapest"
zip_code    "1012"
time_zone   "Europe/Budapest"
latitude    47.5
longitude   19.0833
metro_code  0

Meanwhile your site http://www.acssynergy.com/ gave me:

A PHP Error was encountered

Severity: Warning

Message: file_get_contents(http://freegeoip.net/json/84.236.112.202): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

Filename: controllers/Welcome.php

Line Number: 42

Backtrace:

File: /hermes/bosnacweb01/bosnacweb01aw/b2306/ipg.acsadminnet/acssynergy/application/controllers/Welcome.php
Line: 42
Function: file_get_contents

File: /hermes/bosnacweb01/bosnacweb01aw/b2306/ipg.acsadminnet/acssynergy/index.php
Line: 309
Function: require_once

Checking the answer header from freegeoip:

CF-RAY  3b0174ce90247f00-BUD
Connection  keep-alive
Content-Encoding    gzip
Content-Type    application/json
Date    Thu, 19 Oct 2017 05:49:49 GMT
Server  cloudflare-nginx
Set-Cookie  __cfduid=dc13fe607037f5a784ef21ffae22ab31d1508392189; expires=Fri, 19-Oct-18 05:49:49 GMT; path=/; domain=.freegeoip.net; HttpOnly
Transfer-Encoding   chunked
Vary    Origin
X-Database-Date Thu, 05 Oct 2017 01:49:14 GMT
X-Ratelimit-Limit   15000
X-Ratelimit-Remaining   14999
X-Ratelimit-Reset   3600

Please check your X-Ratelimit-Remaining . If it is 0, you will have to wait until X-Ratelimit-Reset to get values from this site (not tested). If you check your X-Ratelimit-Reset your will know when you can connect again.

Another solution to change geoip provider. Details here: freegeoip doesn't work anymore