Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > How to get clientside IP-addr

Reply
Thread Tools

How to get clientside IP-addr

 
 
David Cook
Guest
Posts: n/a
 
      08-07-2004
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?


 
Reply With Quote
 
 
 
 
Hywel
Guest
Posts: n/a
 
      08-07-2004
In article <f5mdnQU68YDYk4jcRVn->, says...
> 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


--
Hywel

http://sponsorhywel.org.uk/
 
Reply With Quote
 
 
 
 
Michael Winter
Guest
Posts: n/a
 
      08-07-2004
On Sat, 7 Aug 2004 13:15:48 -0400, David Cook <(who wants to know?)> wrote:

> 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

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail
 
Reply With Quote
 
Grant Wagner
Guest
Posts: n/a
 
      08-09-2004
David Cook wrote:

> 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.

--
Grant Wagner <>
comp.lang.javascript FAQ - http://jibbering.com/faq

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
calling clientside js with onchange event Zeebra3 ASP .Net 5 07-14-2007 11:12 PM
ClientSide event processing loading data anonymous ASP .Net 0 01-05-2004 06:47 PM
ClientSide Error Handling... Jorell ASP .Net 2 11-21-2003 01:02 AM
Re: Server couldnt notice object that i appended (ClientSide) ... Karl Seguin ASP .Net 1 07-28-2003 12:04 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57