Updated GeoIP from freegeoip to use ipstack API instead

This commit is contained in:
Thulinma 2018-09-20 17:13:24 +02:00
parent ce1eef0885
commit e5bb5faacb

View file

@ -630,7 +630,7 @@ void handleServer(void *hostEntryPointer){
HTTP::Downloader DL;
if (DL.get(HTTP::URL("http://freegeoip.net/json/"+url.host)) && DL.isOk()){
if (DL.get(HTTP::URL("http://api.ipstack.com/"+url.host+"?access_key=05eb21db3983dec4cd6d22131ec0a40d&format=1")) && DL.isOk()){
JSON::Value &gDet = entry->details->geoDetails;
INFO_MSG("Location: %s", DL.data().c_str());
gDet = JSON::fromString(DL.data());