How to get clientside IP-addr

D

David Cook

Is it possible in Javascript to determine the numerical
IP-addr that the client is using?

(Normally, I'd do this on the server-side, where it is trivial.)

But, I'm just curious how to do it on the client-side if it's
possible. Of course, in general, the client IP-addr wouldn't
even be relevant if the current page/document came from
a 'file://' URL, but I'm assuming if the current document
came from a (non-local) http:// URL, then maybe both
the server and the CLIENT ip-address could be acquired
somehow.

Can it be done?
 
H

Hywel

Is it possible in Javascript to determine the numerical
IP-addr that the client is using?

(Normally, I'd do this on the server-side, where it is trivial.)

But, I'm just curious how to do it on the client-side if it's
possible. Of course, in general, the client IP-addr wouldn't
even be relevant if the current page/document came from
a 'file://' URL, but I'm assuming if the current document
came from a (non-local) http:// URL, then maybe both
the server and the CLIENT ip-address could be acquired
somehow.

Can it be done?

Wouldn't you already know the server's IP address? After all, that's
where the page is coming from. As for the client IP, it's relatively
useless when you consider that move users connect through some sort of
proxy (transparent or otherwise) that means the thousands of users have
the same IP address.

http://developer.irt.org/script/1685.htm
 
M

Michael Winter

Is it possible in Javascript to determine the numerical
IP-addr that the client is using?

[snip]

I don't believe so; I can't think of any way off the top of my head. Check
the group archives with Google. I'm sure this has been covered before.

Mike
 
G

Grant Wagner

David said:
Is it possible in Javascript to determine the numerical
IP-addr that the client is using?

(Normally, I'd do this on the server-side, where it is trivial.)

But, I'm just curious how to do it on the client-side if it's
possible. Of course, in general, the client IP-addr wouldn't
even be relevant if the current page/document came from
a 'file://' URL, but I'm assuming if the current document
came from a (non-local) http:// URL, then maybe both
the server and the CLIENT ip-address could be acquired
somehow.

Can it be done?

In addition to what others have said, you should understand what
"client" IP-addr you are referring to.

1) are you referring to the private (typically) non-routable IP
address the computer on my LAN has (192.168.0.x)? This can be
obtained in some versions of Netscape, but since it is a private
(typically) non-routable IP address that is also assigned to
possibly thousands of other computers around the world, it's not
very useful.
2) are you referring to the IP address assigned to my gateway by my
ISP? This can not be obtained using any mechanism I know of if I'm
using a proxy.
3) are you referring to the IP address of the proxy which I use to
browse the Web? This can be easily obtained by the server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top