Location detecting tecniques for IP addresses

Posted by ilhan on Stack Overflow See other posts from Stack Overflow or by ilhan
Published on 2010-04-04T13:41:23Z Indexed on 2010/04/04 13:53 UTC
Read the original article Hit count: 391

What are the location detecting tecniques for IP adresses?
I know to look at the
$_SERVER['HTTP_ACCEPT_LANGUAGE'] (not accurate but mostly useful to detect location, for example if an IP range's users set French to their browser then it means that this range) belongs to France
and
gethostbyaddr($_SERVER['REMOTE_ADDR']) (to look country code top-level domain)
then may be to whois gethostbyaddr($_SERVER['REMOTE_ADDR'])
sometimes:
$HTTP_USER_AGENT (Firefox's user agent string has language code, not accurate but mostly can be used to detect the location)

But what about cities?

© Stack Overflow or respective owner

Related posts about http

Related posts about ip-geolocation