GithubHelp home page GithubHelp logo

mrhaber / geoip-api Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 173 KB

๐Ÿ—บ 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: Apache License 2.0

Java 100.00%
geoip-api geo-location geolocation-api java-geopackage java earth map

geoip-api's Introduction

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

geoip-api's People

Contributors

mrhaber avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alexbugdev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.