GEOIP和获取计算机的IP地址位置? [英] GEOIP and getting a computers IP address Location?

查看:190
本文介绍了GEOIP和获取计算机的IP地址位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我的网站能够找到计算机位置,因此如果有人从伦敦或曼彻斯特等地访问我的网站,并根据计算机位置显示某个区域的用户。有点像在线约会网站,建议您所在地区的用户。

I want my site to be able to locate a computers location, so if someone is accessing my site from london or manchester etc and to have users from a certain area displayed depending on their computers location. kind of like an online dating site that suggests users in your area.

我一直在关注这个列出世界各地城市的GEOIP数据库。但我不知道接下来该做什么?我是否需要查看获取IP地址脚本来提取和比较GEOip数据库中的信息?

I have been looking at this GEOIP database that lists all the cities around the world. But i dont know what to do next? Do i need to look at get ip address scripts that pull and compare the information from the GEOip database?

请有人指出我正确的方向。谢谢。

Please can someone point me in the right direction. Thanks.

GeoIP数据库来自:
http://dev.maxmind.com/geoip/geolite

GeoIP database from: http://dev.maxmind.com/geoip/geolite

推荐答案

这取决于您的需要。我建议您使用Web服务,这样您就不必担心托管数据库并自行维护。您需要做的就是解析访问者的IP地址并立即获得结果。我正在使用此网站中的IP2location网络服务。

It depends on your need. I would suggest you use a web service so you do not need to worry about hosting the database and maintaining it on your own. All you need to do is parse the IP address of your visitor and get the result instantly. I am using the IP2location web service from this site.

这篇关于GEOIP和获取计算机的IP地址位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆