Solved

client side ip

Posted on 2014-04-11
7
321 Views
Last Modified: 2014-04-14
is there any way to get client's internal ip address via jscript like 192.168.1.27
0
Comment
Question by:F4SX
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39993678
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.
0
 
LVL 12

Accepted Solution

by:
jitendra patil earned 500 total points
ID: 39993746
you can try the below jquery stuff
<script type="text/javascript" src="Scripts/jquery-1.6.2.js"></script>

 <script type="text/javascript">

     $.getJSON("http://jsonip.appspot.com?callback=?",

    function (data) {

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

    });

 </script>

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

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

</body>

Open in new window

hope this helps.
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39993769
jitendra patil, he can get your outside IP already.   I think he is looking for the internal IP.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Expert Comment

by:CEHJ
ID: 39994197
What would you want to do with it? It's generally useless unless you're on the same LAN
0
 

Author Comment

by:F4SX
ID: 39996699
I have a project which has a VPN server with serving ip addresses

10.0.0.0/24

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

i want to know whcih client get the which ip address and where he come from
0
 

Author Closing Comment

by:F4SX
ID: 40000833
thanks
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question