You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jonttu 92e683b3b3 Project files 2 years ago
IPResolver.java Project files 2 years ago
README.md Project files 2 years ago

README.md

Java-IP-API

Simple java class example for https://api.jonttu.fi/ip.php API

When using this API you will need token and token has to be placed in IPResolver class to token variable!

Example:

// Makes new instansce of IPResolver and gets data from API
// Running this calls web api and recommended to run asyncronoysly
IPResolver resolver = new IPResolver("127.0.0.1");

// If request succeeded returns true
boolean status = resolver.getStatus();

// Returns request status message "success" is output when everything is alright.
String statusMsg = resolver.getStatusMsg();

// General information about ip
String address = resolver.getIP();
String country = resolver.getCountry();
String city = resolver.getCity();
String isp = resolver.getIsp();

// This is kind of special parameter...
// Parameter tells if ip address belongs to somekind of hosting company or is vpn or proxy service.
boolean hosting = resolver.isHosting();