During the last few years I have had several occasions to wonder who used the website and web-applications I had helped develop and deploy. Most recently I had this very same question for our weblog: we have had over 36000 different IP-addresses visiting our website and I have not got a clue where they come from – the time at which they visit is the only indication.
Recently I did some cursory investigations and found a number of WebServices that suggested they would return information for IP-addresses. However, I found none of them properly functioning (at least not without paying a fee). Today I had more luck. I came across the site http://www.showmyip.com/. This site provides a lot of details for your own IP-address. It also provides several services for retrieving information about IP addresses or Host Names you provide as input. You can request information for up to 100 IP addresses per day for free. Beyond that, you need to subscribe at a fee.
The information provided for IP-address includes Country, Continent, City, Host Name, Provider. For my purposes I am primarily interested in Continent and Country, so this suffices.
The service is offered through several channels:
* An interactive website – you fill in the fields of an HTML form an press a button; the results are returned as HTML or Text document
* A GET interface – using URLs such as http://www.showmyip.com/simple/?ip=188.8.131.52&get=country or http://www.showmyip.com/simple/?host=www.amis.nl&get=ip,country,city,state-name,timezone, you get returned a text-document that contains the requested information. Note that timezone and city is information only provided to subscribers.
* A WebService – the WSDL url is http://www.showmyip.com/soap/lookupserver.php?wsdl; using for example Oracle JDeveloper, it took me all of one minute to create a Client Application for this WebService, giving me a programmatic access to IP Address information.
The next step for me will be to create a batch process that will use the WebService Client to get hold of IP Address data (Country and Continent) for the top 100 Visitors of the day. Given the total of 36000 IP addresses and the growth from new visitors it may be some time before we have checked all visitors, but before too long we should have a pretty good indication of the origin of the majority of our visitors.
JDeveloper WebService Client Application
The JDeveloper project I created – or better said; generated – for accessing the WebService at showmyip.com is show in the image below. More precisely, the image is a snapshot of the debug-mode, right after invoking the WebService client. In the Debugger SmartData Window we can see the properties returned by the WebService for the IP address under scrutiny.
The entire JDeveloper (Release 10.1.3) project can be downloaded here: IPLookupWebService.zip