具有免费IP地理位置网络服务的IP地址中的国家/地区名称 [英] Country name from an Ip address with free IP geolocation webservice
本文介绍了具有免费IP地理位置网络服务的IP地址中的国家/地区名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
首先感谢所有人.
我了解到我可以使用免费的IP地理位置Web服务从IP地址获取国家/地区名称.但是,我如何获得对站点的响应,实际上这就是我的样子,在我的站点中,需要显示IP地址中的国家/地区名称.能否请您详细说说...我如何显示该站点的国家名称..
I read that i can use the free IP geolocation webservice to get Country name from an Ip address. But how i get the response to my site , Actually this is what i look , In my site there is a need of displaying the country name from Ip address. Can uou please tell in detail... How can i display the country Name from that site ..
推荐答案
http://www.maxmind .com/app/php
您需要安装php模块,然后使用以下代码获取国家/地区名称:
You need to install the php module and then use the following code to get the country name:
$country_name = apache_note("GEOIP_COUNTRY_NAME");
这篇关于具有免费IP地理位置网络服务的IP地址中的国家/地区名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文