TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How are IP addresses geocoded to latitude and longitude?

6 点作者 jbranchaud超过 10 年前
There are a bunch of API services out there that are able to determine the latitude and longitude (and other data, e.g. state, city, etc.) for a given IP address. How are they able to do this? How does one know what part of the world an IP address is associated with?

3 条评论

Someone1234超过 10 年前
Good-ish article in this Stackoverflow article[0]. The short version is: Any website that has your location (e.g. city, address, etc) can sell that data on and do.<p>In the US in particular there are nearly no data protection laws (except healthcare records). So companies &quot;share&quot; data with impunity.<p>[0] <a href="https://stackoverflow.com/questions/1996106/how-does-ip-geolocating-work" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;1996106&#x2F;how-does-ip-geol...</a>
Joyfield超过 10 年前
First of all you can do a whois on an IP address to get where the company that registered is located. If you traceroute the address you can sometimes get hints on where it is. And then some big sites may use geo locotation services on their websites that query the browser&#x2F;APP GPS where the user is located and then it may be concluded that the whole &#x2F;24 net is within that area and then the site will sell this information to geo location services.
willvarfar超过 10 年前
You can download a DB with this info here: <a href="http://dev.maxmind.com/geoip/geoip2/geoip2-csv-databases/" rel="nofollow">http:&#x2F;&#x2F;dev.maxmind.com&#x2F;geoip&#x2F;geoip2&#x2F;geoip2-csv-databases&#x2F;</a><p>I integrated that into my own webserver so I get fun logs; there&#x27;s a tingle when you see people reading your own posts after all.<p>You can also buy a bigger, better DB from the same people.
评论 #8572679 未加载