Get User Location by IP Address - JavaScript Tutorial

Поділитися
Вставка
  • Опубліковано 13 січ 2025

КОМЕНТАРІ • 6

  • @OpenJavaScript
    @OpenJavaScript  2 роки тому +3

    👉 Source code: openjavascript.info/2022/09/09/get-a-users-location-with-frontend-javascript/
    Also, I made slight boo boo in this video: the ip.address() method actually returns the IP address of the hosting server, not the incoming request!
    The good news is that you CAN determine the IP of an incoming request vanilla by calling req.socket.remoteAddress inside the server code on the incoming request. No need for the IP package!

  • @OscarA-c2l
    @OscarA-c2l Місяць тому

    2:41 - That's your server IP, not your actual IP address.

  • @ConstantineFortuna-tz1yh
    @ConstantineFortuna-tz1yh Рік тому

    so how do i make it so whenever they log on to my website i get the ip instead of it being local host 3000

  • @diogosantos2049
    @diogosantos2049 Рік тому +1

    If I put this on my website will not appear the message "fraudulent website" or some other security message?