How To Get a User's IP Address With JavaScript

preview_player
Показать описание
In this tutorial, you'll learn how to get a user's IP address with JavaScript.

If you need to get client IP addresses in JavaScript you'll need to send a network request to a remote server to find out what IP address has been assigned to a user. Channel Handle @codebubb
Рекомендации по теме
Комментарии
Автор

thankz bro its been very helpful for me 😍😍😍

streetboss
Автор

If I deploy that web app to a chinese server, would it return the client public IP or the server public IP? Thanks

RodrigoHernandez-qjii
Автор

works also with axios on npm if someone needs ;D

thatonefoxxy
Автор

bro leaked his ip so we can leak others. Mans a legend

someoneishere_
Автор

Thank you very much for the explanation, if I want to change the ip, for one that is entered in an input, what would be the solution?

luisfernandoperezvarajas
Автор

Hello! And how could I share my public adress so people can know witch IP have at the time? So I don't have to provide it every time. (My public IP changes every 12 hrs)

Ramat
Автор

Fantastic!!! Thank you! +1 Like + 1 Subscriber!

francis_js
Автор

Hello I have a question maybe you could help with. This way returns format
{ ip: X.X.X.X }

I would like to remove the word ‘ip’ and remove the curly brackets and just get the ip number. Any suggestions ?

aserillll
Автор

Having cors issues. The preflight response I'm getting doesn't have the 'access-control-allow-origin' header

jamestacular
Автор

hi - I'm really struggling with how I can push the IP into a variable so I can work with it (if statement, redirect etc) - can someone help ? I'm not used to the json format

johnnyguitar
Автор

Greetings,
do you know how to pass 'ERR_BLOCKED_BY_CLIENT' when the user is using some kind of an adblock (f.e. uBlock Origin)?
Great video.

jakubhampl
Автор

how do i send it in a discord webhook sir

void-lcwu
Автор

Can i save this to local storage after fetching ip address? Please reply!

to_serveMyNation
Автор

Hi i need help my website, is connect through web server Apache (2.4)and app server Jboss, i need to get the client ip adress. Can anyone help me in this

mazheradvise
Автор

struggling with assigning data.ip to a variable

priyanshukatuwal
Автор

Thanks for giving me your ip :]
I will do nothing, im not a hacker

shotgunner
Автор

Its a client IP address, how to fetch IPV4 address?

shitanshugautam
Автор

Why the IP is difference when I check my IPv4 in CMD?

ilhamvocalovi
Автор

It does not work, it gives the public IP and it does not give the internal IP.

carlfercho
Автор

I can get the ip to store to a variable

var ip;
.then(results => results.json())
.then(data => (ip = data.ip));

k.christiantolliver
welcome to shbcf.ru