What are the location detecting techniques for IP addresses?
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)
Also I know how to get the time zone but it does not work in the new browsers.
Moreover there is css issue that detects visitor's history, it can be used to see what google and wikipedia pages he/she has visited (google.co.uk, google.com.tr)
But what about cities?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…