I use PHP and I want to know if there's a free web service that can detect the countries of my visitors. Right now i can get their IPs and I have downloaded some IPtables that relate some locations but i don.t think they're quite accurate. So if you are aware of some free webservice it would be just great. Thanks!
i tried the GeoIP Country link... but it says that i have to pay a 50$USD license fee :(
leanyo martinet
2010-08-30 11:11:37
You'll need to use GeoLite libraries at the Open Source section.
fabrik
2010-08-30 12:04:40
A:
You could download and use this database http://software77.net/geo-ip/
NixNinja
2010-08-30 09:36:49
cool, but i was actually looking for a web service, thanks anyways
leanyo martinet
2010-08-30 11:12:25
+2
A:
I have used the following SOAP GeoIPService to good effect from webservicex.net.
You will also of course need to enable SOAP support in your PHP config.
You could then try something like:
$client = new SoapClient("http://www.webservicex.net/geoipservice.asmx?WSDL");
$params = new stdClass;
$params->IPAddress = 'xxx.xxx.xxx.xxx';
$result = $client->GetGeoIP($params);
// Check for errors...
$country = $result->GetGeoIPResult->CountryName;
hydrogen
2010-08-30 09:52:46
it looks niche, i'll try it at home and if everything's OK i'll check this one as the best answer :)
leanyo martinet
2010-08-30 11:10:48
You could also try http://ipinfodb.com/ip_location_api.php which is another good free one if the above doesn't work out for you. I would take the results with a grain of salt though as it is free so you can't expect them to be 100% accurate.
hydrogen
2010-08-30 21:30:47