3G/Edge/GPRS IP 地址和地理编码

发布于 2024-08-31 10:46:52 字数 211 浏览 4 评论 0原文

我们正在寻求开发一个移动网站。在此移动网站上,我们希望根据用户的 IP 地址自动填充用户的位置(通过适当的后备)。我知道基于 IP 地址对位置进行地理编码(映射到纬度、经度,然后使用该信息获取位置)。

不过,我很好奇这个信息的准确性如何?移动设备在使用 3G、EDGE 和 GPRS 连接时是否会分配 IP?我想是的。如果是这样,它是否映射到相对准确的位置?不一定要准确,但相对准确就更好了。

We're looking to develop a mobile website. On this mobile website, we'd like to automatically populate a user's location (with proper fallback) based on their IP address. I'm aware of geocoding a location based on IP address (mapping to latitude, longitude and then getting the location with that information).

However, I'm curious how accurate this information is? Are mobile devices assigned IPs when they utilize 3G, EDGE, and GPRS connections? I think so. If that is so, does it map to a relatively accurate location? It doesn't have to be spot on, but relatively accurate would be nice.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深海夜未眠 2024-09-07 10:46:52

简短回答:不会。

当激活 PDP 上下文时,网络会为电话分配一个 IP 地址(激活 PDP 上下文是电信术语,意思是“请求分组数据服务”)。它可以在网络控制下更改,但这通常仅在连接休眠一段时间后才会发生。

您需要记住,典型的移动网络可能拥有数百万用户,并且由于信令(即地址重新配置等)不会产生收入,而是会消耗网络稀缺的无线电资源,因此应尽可能避免。

还有一个进一步的问题。由于移动网络的架构,如果您的访问者正在使用其本国运营商的漫游服务运营的国家/地区,那么他们实际上“看起来”在其本国。这是因为移动设备始终通过其家庭网络中名为 GGSN 的节点连接到互联网。

对于必须与权利持有人打交道的网站来说,这是一个主要问题。例如,BBC iPlayer 服务允许位于英国的人们免费“赶上”任何 BBC 电视或广播内容。在许多情况下,电视转播权是按地域许可的,因此 BBC 需要尽一切努力确保该服务仅向位于英国的用户提供。

正如我上面所解释的,这对于移动用户来说是不可能的。如果我使用英国网络的 SIM 卡,则无论我实际身在世界何处,我都会通过地理位置“显示”在英国。

这还不是一个大问题:在外国网络中漫游时通过 3G 连接流式传输电视节目的费用非常昂贵(单个节目很容易达到 100 美元或以上),因此这个理论上的问题不会出现太多到目前为止还经常。然而,随着漫游数据成本下降(每个人都知道会下降),这将成为一个真正的问题。

Short answer: No.

The network assigns an IP address to the phone when the PDP context is activated (activation of PDP context is telecomms-speak for 'asking for packet data services'). It can be changed under network control, but this usually only happens when the connection has been dormant for some time.

You need to bear in mind that a typical mobile network may have several million users, and since signaling (i.e. address reconfiguration and the like) doesn't generate revenue, but costs the network scarce radio resources, it gets avoided as far as possible.

There is a further issue. Due to the architecture of mobile networks, if you have a visitor to a country who is operating using the roaming service with their home operator, they will in fact 'appear' to be in their home country. This is because the mobile device always connects to the internet through a node called the GGSN in their home network.

This is a major issue for websites which must deal with rightsholders. As an example, the BBC iPlayer service allows people located in the UK to 'catch up' on any BBC TV or radio content free of charge. In many cases, TV rights are geographically licensed, so the BBC is required to make every effort to ensure that the service is only available to users located in the UK.

This is, as I have explained above, impossible for mobile users. If I am using the SIM card of a UK network, I will 'appear' by geolocation to be in the UK regardless of where I actually am in the world.

This is not so much of a problem as yet: streaming a TV program over a 3G connection when roaming in a foreign network is prohibitively expensive (could easily be $100 or upwards for a single program), so this theoretical problem doesn't arise very often as yet. However, as roaming data costs fall (and everyone knows they will), it will become a real issue.

极度宠爱 2024-09-07 10:46:52

新的智能手机(如 Apple 的 iPhone)通常具有支持 HTML5 和/或某种其他形式的客户端地理定位的网络浏览器。

例如,HTML5 能够根据 a) 设备 GPS 位置、b) Wifi 三角测量以及 c) IP 地址对计算机或移动设备进行地理定位。

这是一种客户端方法,浏览器会询问用户是否愿意与您共享他们的位置(这可能会或可能不会破坏您的交易),但它能够提供< 20m精度。

请参阅:关于 HTML 5 中的地理位置

New smart phones (like Apple's iPhone) generally have web browsers that support HTML5 and/or some other form of client-side geolocation.

HTML5, for example, has the ability to geolocate the computer or mobile device based on a) position of the device's GPS, b) Wifi Triangulation and then c) IP address.

This is a client-side approach, and the browser will ask the user if they wish to share their location with you (which may or may not be a deal-breaker for you), but it is capable of providing < 20m accuracy.

See: About Geolocation in HTML 5

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文