Location detecting tecniques for IP adresses

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:43 UTC
Read the original article Hit count: 288

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
gethostbyaddr($_SERVER['REMOTE_ADDR'])
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 geolocation