You can also use longitude to determine the servers location based on time zone.
local longitude = http:JSONDecode(http:GetAsync('http://ip-api.com/json/')).lon
local host = 'NA'
if(longitude>-180 and longitude<=-105)then
host = 'WUS'
elseif(longitude>-105 and longitude<=-90)then
host = 'CUS'
elseif(longitude>-90 and longitude<=0)then
host = 'EUS'
elseif(longitude<=75 and longitude>0)then
host = 'EU'
elseif(longitude<=180 and longitude>75)then
host = 'AS'
end