how to determine which country the IP is coming from ? like e.g
when a visitor came to a site, I can log the ip using
$_SERVER['REMOTE_ADDR'] ,
but that’s all a combination of numbers,
if let’s say I want to log only the IP address coming from the US,AU,UK, or any other country that I want specifically,
how to do that “without” using any database tables where the logger is hosted ?
A nice web service for this is http://www.whoisxmlapi.com/.
You can get the data as XML or JSON and use the country attribute of the header.