Skip to content

πŸ—Ί GeoIP-API this is simple api for developers using Java 8, with this API you can parce much more thinks IP's for get inforation. 🌎

License

Notifications You must be signed in to change notification settings

MrHaber/GeoIP-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Language License GitHub license GitHub issues GitHub tag Repo-size Stars Forks Travis

GeoIP-API

βœ‹ API for working with IP and Geo Location from webresources. using some maxmind api

About

This API helps the user use the Internet Protocol differently. Please check new updates on github Check Releases

Maven

<repositories>
   <repository>
	<id>jitpack.io</id>
	<url>https://jitpack.io</url>
	</repository>
</repositories>

<dependency>
     <groupId>com.github.MrHaber</groupId>
     <artifactId>GeoIP-API</artifactId>
     <version>0.15</version>
     <type>pom</type>
</dependency>

Gradle (Groovy)

allprojects {
	repositories {
		maven { url 'https://jitpack.io' }
	}
}
	
dependencies {
	implementation 'com.github.MrHaber:GeoIP-API:0.15'
}

You can use this, without large dependency.

loader = new GZIPLoader("https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=xn8gNRMTA7nzHy3g&suffix=tar.gz", loader_file_link, "GeoIP-City.tar.gz");

loader.start(loader.load(loader.getURL(), loader.getPath(), loader.getName()));

Features

1.0

  • Fatest request DB
  • Implemented Cache handler

1.1

  • Not require zip link information
  • Automatic IP handler
  • Such GeoIP.java now redefined

1.2

1.3

  • Bugs fixed πŸ§€

Dependencies

Examples

Java

   private static final Logger logger = ProxyServer.getInstance().getLogger();

   @EventHandler
   public void ServerConnectEvent(ServerConnectedEvent e) {
       final ProxiedPlayer player = e.getPlayer();
       
   	
   	try {
   		
   	GeoAPI provider = GeoProvider.createConnectionDB().initStatementIP(player.getAddress().getHostName()).getGeoAPI();
   	
   	logger.log(Level.INFO, "[GeoIP] Player country is : " + provider.getCityProvider().getName());
   	
   	}catch (Exception ex) {
   		
   		logger.log(Level.WARNING, "[GeoIP] Something went wrong");
   		
   	}
       
   }

Installing

  • Install bungeecord
  • Move GeoIP-API.jar into plugins folder
  • Start the server so that the database boots.
  • You can use plugins with api if database are loaded

https://github.com/MrHaber/GeoIP-API-Bungee/releases

Licence

Project leached Apache License Version 2.0. For more information

About

πŸ—Ί GeoIP-API this is simple api for developers using Java 8, with this API you can parce much more thinks IP's for get inforation. 🌎

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages