PHPackages                             brightnucleus/geolite2-country - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. brightnucleus/geolite2-country

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

brightnucleus/geolite2-country
==============================

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

v0.2.3(9y ago)2318.0k7[2 issues](https://github.com/brightnucleus/geolite2-country/issues)[1 PRs](https://github.com/brightnucleus/geolite2-country/pulls)MITPHPPHP &gt;=5.4

Since Mar 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/brightnucleus/geolite2-country)[ Packagist](https://packagist.org/packages/brightnucleus/geolite2-country)[ RSS](/packages/brightnucleus-geolite2-country/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (12)Used By (0)

Bright Nucleus GeoLite2 Country Database
========================================

[](#bright-nucleus-geolite2-country-database)

[![Latest Stable Version](https://camo.githubusercontent.com/a32ea5eefd961f24af04c6cba41d387b6d9bd98367e099f350a7167dcce8dcbd/68747470733a2f2f706f7365722e707567782e6f72672f6272696768746e75636c6575732f67656f6c697465322d636f756e7472792f762f737461626c65)](https://packagist.org/packages/brightnucleus/geolite2-country)[![Total Downloads](https://camo.githubusercontent.com/57070ee71d73efb44932eb5a2a7a41f87b836fcaf26d82d47061b42e79d95a50/68747470733a2f2f706f7365722e707567782e6f72672f6272696768746e75636c6575732f67656f6c697465322d636f756e7472792f646f776e6c6f616473)](https://packagist.org/packages/brightnucleus/geolite2-country)[![Latest Unstable Version](https://camo.githubusercontent.com/c2810ccda66558bdc90386a7e89bfc4c644b1d460faf46751df6896d186af295/68747470733a2f2f706f7365722e707567782e6f72672f6272696768746e75636c6575732f67656f6c697465322d636f756e7472792f762f756e737461626c65)](https://packagist.org/packages/brightnucleus/geolite2-country)[![License](https://camo.githubusercontent.com/4621d7fed982cc3400b38d603a359cacbceb7ef634ea435495abbda13e75c549/68747470733a2f2f706f7365722e707567782e6f72672f6272696768746e75636c6575732f67656f6c697465322d636f756e7472792f6c6963656e7365)](https://packagist.org/packages/brightnucleus/geolite2-country)

This is a Composer plugin that provides an automated binary version of the free MaxMind GeoLite2 Country database.

The main advantage is that the downloaded database will be checked for updates on each `composer install` and `composer update`.

Table Of Contents
-----------------

[](#table-of-contents)

- [Attribution](#attribution)
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Example](#example)
- [Contributing](#contributing)
- [License](#license)

Attribution
-----------

[](#attribution)

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

Installation
------------

[](#installation)

The only thing you need to do to make this work is adding this package as a dependency to your project:

```
composer require brightnucleus/geolite2-country
```

Basic Usage
-----------

[](#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.

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

```
