logic-unit
logic-unit

Reputation: 4313

WIPmania API - Get IP Geolocation

I'd like to use WIPmania's API to map IP address. http://www.wipmania.com/en/api/

Does anyone know how to grab the value returned in PHP?

For example the url (http://api.wipmania.com/123.45.67.89?google.com) returns the country code KR.

If it was returning an XML file I'd be alright, but this has confused me.

Thanks in advance.

Upvotes: 4

Views: 3226

Answers (3)

Alix Axel
Alix Axel

Reputation: 154643

Thanks for spreading WIPmania, didn't knew about their web-services. To answer your question:

$country = file_get_contents('http://api.wipmania.com/123.45.67.89?google.com'); // KR

Upvotes: 4

user217315
user217315

Reputation: 1

No, ipinfodb.com isn't accurate because based on maxmind. See http://www.wipmania.com/en/blog/why-worldip-data-rather-than-whois-data-examples/

You can work easy with Wipmania API: www.wipmania.com/en/blog/source-code-to-access-to-api/

Upvotes: 0

logic-unit
logic-unit

Reputation: 4313

Ah I found a better service that returns an XML file - apparently it's more accurate too.

FYI - http://ipinfodb.com/ip_location_api.php

Upvotes: 0

Related Questions