IP Address using JavaScript

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

IP Address using JavaScript

Post by anjanesh »

Is there any to get the client's IP address using JavaScript alone ?
Im not looking for the most common soultion java.net.InetAddress.getLocalHost().getHostAddress(); - this will require Java plugin.

Thanks
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Hmm... that's tricky. Most of the solutions I found used SSI or, as you mentioned, the Java solution. http://stud1.tuwien.ac.at/~e9125168/javas/jhostip.html does something but I don't think it works (at least, not with Firefox). Perhaps IP addresses are only "truly" available to server-side scripts?
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Its the Java plugin version.
Infact I get the IP in FireFox but in IE its not - showed some error.
Post Reply