I want to know how to get client IP address using jQuery?
Is it possible? I know pure javascript can\'t, but got some code using JSONP from Stack Overfl
JSONP
function GetUserIP(){ var ret_ip; $.ajaxSetup({async: false}); $.get('http://jsonip.com/', function(r){ ret_ip = r.ip; }); return ret_ip; }
If you want to use the IP and assign it to a variable, Try this. Just call GetUserIP()
GetUserIP()