Click here to Skip to main content
16,016,925 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,

Is there a way to get the visitors *local* IP-address or Client machine IP address in javascript?

I mean his LAN address like 192.168.1.x, not his regular IP-address like 123.168.xxx.xxx.

I found several approaches that attempt to do this, but they either give me the external (regular) IP address, or they give 127.0.0.1 which doesn't really tell me anything. I need the local machine IP address.

One of Javascript i used is:
C#
<script type="application/javascript">
function getip(json) {
alert(json.ip);
}
</script>
<script type="application/javascript" src="http://jsonip.appspot.com/?callback=getip"> </script>


Thanks in advance.
Posted
Updated 18-Jul-14 1:15am
v2

1 solution

With a quick search I found these links : Check these[^], [^], [^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900