How to know the IP of the person who logged on to your site using JS?

Want to know the IP of the visitor and then using the IP to determine the city. The job for the online store. In PHP there are many solutions, and whether using JavaScript???
June 10th 19 at 15:13
4 answers
June 10th 19 at 15:15
Solution
On the bare js in any way.
But if there is such problem, you can use such a crap https://javascript.ru/forum/misc/2272-opredelenie-...
norms so)
think rolled
THANK you!) - paul.Kloc commented on June 10th 19 at 15:18
June 10th 19 at 15:17
No way. As his client will determine if he can not know?
June 10th 19 at 15:19
Only to do the API request to server which will return the desired data.
Can be for example from Yandex maps to pull

https://api-maps.yandex.ru/2.0-stable/?load=package.standard&lang=ru-RU
June 10th 19 at 15:21
Node.js maybe the definition of IP,, Google. Php is so not on the client does)

Find more questions by tags jQueryJavaScript