function getIp() {
var res = false;
$.ajax(
{
url: '//freegeoip.net/json/',
type: 'POST',
//global: false,
async: true,
dataType: 'jsonp',
success: function(location) {
res = location;
console.log(res);
}
});
return res;
}