Free IP and Domain API

Share business templates, ideas, experiences, etc with fellow Servoy developers here

Free IP and Domain API

Postby Mccourt.cordingley1372837951 » Mon Sep 28, 2015 5:22 pm

Hi All

Just a quick note.

I have recently built a small service to enable the lookup of domain and ip information through simple get requests.

Its free forever and available here.
http://www.hoast.xyz

Examples are using curl and wget but you can simply do the same using the http client.

If anyone is interested please reply to this post and i will provide an example on how to do this in servoy using the http client.

Regards
User avatar
Mccourt.cordingley1372837951
 
Posts: 28
Joined: Wed Jul 03, 2013 9:52 am

Re: Free IP and Domain API

Postby Mccourt.cordingley1372837951 » Mon Sep 28, 2015 5:51 pm

I thought i may as well do the examples anyway.

Here goes

Code: Select all
var ip = "x.x.x.x"
var domain = "google.com"
var iplookup = plugins.http.createNewHttpClient().createGetRequest("http://www.hoast.xyz/ip/"+domain).executeRequest().getResponseBody()
var reversedns = plugins.http.createNewHttpClient().createGetRequest("http://www.hoast.xyz/domain/"+ip).executeRequest().getResponseBody()
var yourExternalIp = plugins.http.createNewHttpClient().createGetRequest("http://www.hoast.xyz/ip").executeRequest().getResponseBody()
var yourReverseDns = plugins.http.createNewHttpClient().createGetRequest("http://www.hoast.xyz/domain").executeRequest().getResponseBody()
var geoLocateIp = plugins.http.createNewHttpClient().createGetRequest("http://www.hoast.xyz/ipgeo/"+ip).executeRequest().getResponseBody()
var geoLocateDomain = plugins.http.createNewHttpClient().createGetRequest("http://www.hoast.xyz/domaingeo/"+domain).executeRequest().getResponseBody()
var dnsServerRecordLookup = plugins.http.createNewHttpClient().createGetRequest("http://www.hoast.xyz/dns/"+domain).executeRequest().getResponseBody()
application.output(reversedns)
application.output(iplookup)
application.output(yourExternalIp)
application.output(yourReverseDns)
application.output(geoLocateIp)
application.output(geoLocateDomain)
application.output(dnsServerRecordLookup)


Any questions give me a yell.
User avatar
Mccourt.cordingley1372837951
 
Posts: 28
Joined: Wed Jul 03, 2013 9:52 am


Return to Sharing Central

Who is online

Users browsing this forum: No registered users and 5 guests