从网页获取数据

I try to resolve ip. I make jquery ajax get, to get data from url, but in console, there is - Uncaught SyntaxError: Unexpected token <

$.get("http://tools.whois.net/whoisbyip/", function (response) {
console.log(response);
}, "jsonp");

I have working code:

$.get("http://ipinfo.io", function (response) {
}, "jsonp");

but i don't get all information, that i need in this.

Try with this code:

$.get("http://ip-api.com/json", function (response) {
console.log(response);
}, "json");

I changed "jsonp" for "json" :).

Your first URL "tools.whois.net/whoisbyip/" response with an error and your other URL "ipinfo.io" don't return nothing.

Example: http://api.jquery.com/jquery.get/ (at the end of the website)