开发者

Get U.S. state from IP address [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

is there a good PHP geolocation service?

Is it possible to determine which state a visitor to a web page is from based on their IP address? I know you can get this data (and relative location data) from开发者_JAVA技巧 searching their IP addresses using the various WHOIS tools out there, but I'm not sure how I would achieve this on a single web page. I want to display some contextual information to visors on my site.


You can install the GeoIP extension.


You can use Maxmind's PHP API for Geo IP lookup with their GeoLiteCity free database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜