-2

how to get users location from my site web (Javascript or PHP) I want to be precise enough. A website that uses from phones a lot.

ipman.dev
  • 35
  • 1
  • 5
  • Possible duplicate of [How to get client's IP address using JavaScript?](https://stackoverflow.com/questions/391979/how-to-get-clients-ip-address-using-javascript) – DFJ Dec 15 '18 at 18:44
  • That's not a duplicate of getting ***IP address***. This is about getting the ***geographical location***. – Pinke Helga Dec 15 '18 at 18:49
  • Possible duplicate of [How to detect country and city using PHP, GeoIP and Maxmind?](https://stackoverflow.com/questions/20642598/how-to-detect-country-and-city-using-php-geoip-and-maxmind) – Pinke Helga Dec 15 '18 at 18:58

2 Answers2

0

You can use this for php. There is also lite version which is free.

Alexander Dimitrov
  • 944
  • 1
  • 6
  • 17
0

There are couple of geolocation libraries for PHP and Javascript, you can try using the following sources in PHP scripts, they also have a steps to installing and configuring the service:

MaxMind

IP2Location

Dalton Whyte
  • 657
  • 1
  • 8
  • 15