Facing IP address block?
I can return the local ip of the client but can't figure a way to get the facing ip. Any suggestions?
I can return the local ip of the client but can't figure a way to get the facing ip. Any suggestions?
Think he means his WAN or ISP IP address.
For example returning a users online / external ip address so that its location can be resolved in virtual earth etc.
Right. The external ip instead of the ip on a LAN.
Using InetAddress I can get the ip of the machine within its local area but I can't figure out a way to get the external ip.
var httpRequest = new window.XMLHttpRequest();
var url = "/Content/Components/Resources/WhatIsMyIP.aspx";
httpRequest.open("GET", url, false);
httpRequest.send(null)
var ip = httpRequest.responseText;
Thanks for the great solution!
I've been working on something very similar for my first block, but I had to do some bad workarounds because I was not aware that there was an aspx file on the Popfly server to get the "real" ip address.
I hope you guys don't mind if I built a simple block based on your code ![]()
That's fine we had put in their for this :-).
hostip.info have a nice web service which looks up address info based on IP address.