ip-geolocation

Get Country of IP Address with PHP

青春壹個敷衍的年華 提交于 2019-11-26 11:32:00
Ideally I'm trying to put together a PHP script that I can query from any web browser and it returns the country of the IP address that accessed the PHP script. Is this possible or is there a better solution? sprain There are free, easy APIs you can use, like those: http://ipinfodb.com/ip_location_api.php http://www.ipgeo.com/api/ http://ip2.cc/ http://www.geobytes.com/IpLocator.htm https://iplocate.io/ and plenty others. Which one looks the most trustworthy is up to you :) Otherwise, there are scripts which are based on local databases on your server. The database data needs to be updated

Get Country of IP Address with PHP

孤者浪人 提交于 2019-11-26 02:28:02
问题 Ideally I\'m trying to put together a PHP script that I can query from any web browser and it returns the country of the IP address that accessed the PHP script. Is this possible or is there a better solution? 回答1: There are free, easy APIs you can use, like those: http://ipinfodb.com/ip_location_api.php http://www.ipgeo.com/api/ http://ip2.cc/ http://www.geobytes.com/IpLocator.htm https://iplocate.io/ and plenty others. Which one looks the most trustworthy is up to you :) Otherwise, there