Jump to content

Login Location


pranshu82202

Recommended Posts

Once you get the visitors IP address there are a lot of websites that will tell you where it belongs to. you can just log on to http://www.ip2location.com/ and type the ip address there and get the location.

 

If you want to do it on your website you need to Download the CSV file from (http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip), then import it via PhpMyAdmin application or mysql console into a newly created database.

After that, you can use it to do simple queries to detect a country via an ip address. You can see examples on maxmind’s website too.

 

You can also do it by using the PEAR package Net_GeoIP:  http://pear.php.net/package/Net_GeoIP.

 

hope it helped.

Link to comment
https://forums.phpfreaks.com/topic/241908-login-location/#findComment-1242306
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.