Geo Location based on IP Address – PHP [closed]

Get Geo-IP Information Requests a geo-IP-server (netip.de) to check, returns where an IP is located (host, state, country, town). <?php $ip=’94.219.40.96′; print_r(geoCheckIP($ip)); //Array ( [domain] => dslb-094-219-040-096.pools.arcor-ip.net [country] => DE – Germany [state] => Hessen [town] => Erzhausen ) //Get an array with geoip-infodata function geoCheckIP($ip) { //check, if the provided ip is valid if(!filter_var($ip, … Read more

Get Country of IP Address with PHP [duplicate]

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 regularly, though. Check out this one: … Read more