IP to Location using Javascript

后端 未结 13 1302
死守一世寂寞
死守一世寂寞 2020-11-27 03:46




        
相关标签:
13条回答
  • 2020-11-27 04:13

    A better way is to skip the "middle man" (ip)

    jQuery.get("http://ipinfo.io", function(response) {
        console.log(response.city);
    }, "jsonp");
    

    This gives you the IP, the city, the country, etc

    0 讨论(0)
提交回复
热议问题