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.
            Asked
            
        
        
            Active
            
        
            Viewed 1,957 times
        
    0
            
            
         
    
    
        devgirl
        
- 39
- 1
- 10
- 
                    there is no right answer there and doesnot work for me. – devgirl Apr 09 '14 at 18:36
- 
                    3The point being made in that question is that you can't do it with javascript without hitting a server-side service. – Kevin B Apr 09 '14 at 18:38
1 Answers
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