2017 © Pedro Peláez
 

composer-plugin geolite2-country

Composer-packaged version of the free MaxMind GeoLite2 Country database.

image

brightnucleus/geolite2-country

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  • Friday, February 10, 2017
  • by schlessera
  • Repository
  • 1 Watchers
  • 17 Stars
  • 5,832 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 12 Versions
  • 18 % Grown

The README.md

Bright Nucleus GeoLite2 Country Database

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

This is a Composer plugin that provides an automated binary version of the free MaxMind GeoLite2 Country database., (*2)

The main advantage is that the downloaded database will be checked for updates on each composer install and composer update., (*3)

Table Of Contents

Attribution

This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com., (*4)

Installation

The only thing you need to do to make this work is adding this package as a dependency to your project:, (*5)

composer require brightnucleus/geolite2-country

Basic Usage

On each composer install or composer update, a check will be made to see whether there's a new version of the database available. If there is, that new version is downloaded., (*6)

To retrieve the path to the binary database file from within your project, you can use the Database::getLocation() method:, (*7)

<?php

use BrightNucleus\GeoLite2Country\Database;

$dbLocation = Database::getLocation();

You can pass this location on to the GeoIp2\Database\Reader class that is provided with the geoip2/geoip2 Composer package., (*8)

Example

The following example assumes that you have added the geoip2/geoip2 Composer package as a dependency to your project, so that it is available to the autoloader., (*9)

<?php

use GeoIp2\Database\Reader;
use BrightNucleus\GeoLite2Country\Database;

function getCountry($ip) {
    $dbLocation = Database::getLocation();
    $reader = new Reader($dbLocation);

    return $reader->country($ip);
}

Contributing

All feedback / bug reports / pull requests are welcome., (*10)

License

This code is released under the MIT license., (*11)

For the full copyright and license information, please view the LICENSE file distributed with this source code., (*12)

The Versions

10/02 2017

dev-master

9999999-dev

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • composer-plugin-api ^1

 

10/02 2017

v0.2.3

0.2.3.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • composer-plugin-api ^1

 

09/02 2017

v0.2.2

0.2.2.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • composer-plugin-api ^1

 

09/02 2017

v0.2.1

0.2.1.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • composer-plugin-api ^1

 

01/08 2016

v0.2.0

0.2.0.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

MIT

The Requires

  • php >=5.4
  • composer-plugin-api ^1

 

05/03 2016

v0.1.6

0.1.6.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4
  • composer-plugin-api ^1

 

04/03 2016

v0.1.5

0.1.5.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4
  • composer-plugin-api ^1

 

04/03 2016

v0.1.4

0.1.4.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4
  • composer-plugin-api ^1

 

04/03 2016

v0.1.3

0.1.3.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.4
  • composer-plugin-api ^1

 

04/03 2016

v0.1.2

0.1.2.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

GPL-2.0+

04/03 2016

v0.1.1

0.1.1.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

GPL-2.0+

03/03 2016

v0.1.0

0.1.0.0

Composer-packaged version of the free MaxMind GeoLite2 Country database.

  Sources   Download

GPL-2.0+