473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

How to get clientside IP-addr

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?
Jul 23 '05 #1
3 3255
In article <f5********************@comcast.com>, 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/
Jul 23 '05 #2
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
Jul 23 '05 #3
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 <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Zeebra3 | last post by:
Here goes: I have a web form with several asp:dropdownlists, with which, when selection is changed I want to fire an event defined in some clientside js. The content of the clientside code is...
5
by: Alvin Bruney | last post by:
I have a server side datagrid control. I'd like to clear the grid before the post occurs using javascript. Anybody know how to do this? It would be a similar effect to binding to a null dataset in...
2
by: Helen | last post by:
I've got some clientside script that runs when the selected index of a select box changes. Now I need to swap my selectbox with an ASP.NET radiobuttonlist (to solve some layout issues). I still...
3
by: Tiësto | last post by:
Hi guys, I'm using a RadioButtonList with three options and I'm trying to get this script rendered properly <input id="rblBillState_0" type="radio" name="rblBillState" value="0" onclick="return...
2
by: Luis Ferrao | last post by:
Hi, I have some code that looks like this: -- CODE ---------------------------- Public Class NodeEditor Inherits System.Web.UI.Page Protected WithEvents ChildList As...
1
by: MattC | last post by:
I have a user control that contains several requiredFieldValidators. The page the control sits in has other RequiredFieldValidators. On submitting the form all the validators on the page fire and...
3
by: RFS666 | last post by:
Hello together, I tried to find out about populating an asp.net server control (a dropdownlist) from the clientside jscript, but I didn't find a solution up to now. I cannot use a html...
16
by: susiedba | last post by:
hey I used to be able to take VB6 code and paste it into a HTML page and it would run on the clientside does anyone know if this is possible in VB 2005? Thanks -Susie
2
by: John Kotuby | last post by:
Hi all, In ASP.NET 2.0 and VB.NET, I am trying to get the OnSelectedIndexChanged event to fire a Javascript function. There is no OnClientClick event for that control. When I try something...
10
by: themadjester | last post by:
This is weird, I know what an IP address conflict is, and how to avoid it, but this problem seems atypical - and apparently client side? Basically I have a router internet network, it is DHCP and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.