0

where I connect to internet, I have an always changing ip address and when I try to get ip address, it does not give my ipv4 address which I am using in my web services to call web service. can you suggest me anything? Thanks.

devgirl
  • 39
  • 1
  • 10

1 Answers1

1

If you are using a backend server you can use something like this:

$.getJSON("http://jsonip.com?callback=?", function (data) {
   alert("Your ip: " + data.ip);
});

reference: http://jsfiddle.net/lesson8/juJYJ/light/

Cavasta
  • 35
  • 5