• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

client side ip

is there any way to get client's internal ip address via jscript like
1 Solution
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Using client side scripting like javasctipt/jquery or server side script like .NET or PHP the answer is no. The browser by nature can't give you any local information or it would be a security issue.  

You would probably have to use a java applet to do this.  

I currently use an applet to access a local printer programatically so I am sure the same can be done to get the local IP.  You just have some security issues to work through in addition to your programming that will include using a certificate for the app.  http://docs.oracle.com/javase/tutorial/deployment/applet/security.html

I am not a java dev but I did find this http://www.mkyong.com/applet/how-to-get-client-ip-address-in-applet/.  Let's add java to your question topic and see if we can bring in some java Devs.
Jitendra PatilSr.Software EngineerCommented:
you can try the below jquery stuff
<script type="text/javascript" src="Scripts/jquery-1.6.2.js"></script>

 <script type="text/javascript">


    function (data) {

        alert("Your ip: " + data.ip);



<script type="text/Javascript">
function getip()
alert('your ip adresse is : ".$_SERVER['REMOTE_ADDR']."');

<body onload="javascript:getip()">


Open in new window

hope this helps.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
jitendra patil, he can get your outside IP already.   I think he is looking for the internal IP.
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

What would you want to do with it? It's generally useless unless you're on the same LAN
F4SXAuthor Commented:
I have a project which has a VPN server with serving ip addresses

and there are 50 router + 1 web server web server ip is and other 50 router give ip address to each client like

i want to know whcih client get the which ip address and where he come from
F4SXAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now