Download the PHP package gpslab/geoip2 without Composer

On this page you can find all versions of the php package gpslab/geoip2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package geoip2

Latest Stable Version Test Coverage Status Scrutinizer Code Quality License

A Symfony Bundle for the Maxmind GeoIP2 API

Bundle for use maxmind/GeoIP2 in Symfony.

Installation

Pretty simple with Composer, run:

Configuration

To configure auto-update the database you need to generate your personal licence key.

Steps for generate licence key

  1. Sign up for a MaxMind account (no purchase required)
  2. Login and generate a licence key
  3. Save your licence key
  4. Open download page and find your needed DB edition ID and copy value from first column.

Example configuration:

Database source URL

By default, this URL is used to download a new databases https://download.maxmind.com/app/geoip_download?edition_id={edition_id}&license_key={license_key}&suffix=tar.gz

You can change this URL, for example, if you want to use a proxy to download the database. You can customize the source URL in the configuration.

Target download path

By default, new databases downloaded in %kernel.cache_dir%/{edition_id}.mmdb, where edition_id is a character ID name from first column on download page. That is, by default, the new database will be downloaded into folder var/cache/{env}/. Keeping the database in the cache folder for each environment may not be optimal. You can choose a common directory for all environments.

Localization

By default, the English locale is used for GeoIP record. You can change the locale for record and declare multiple locales for fallback.

Usage

You can get GeoIP2 reader service:

For more example see the GeoIP2 library.

Multiple databases

You can use multiple GeoIP databases in one application. Need update configuration file.

Using in application:

You can rename the default database.

In order not to repeat the license key and locales for each database, you can specify them once.

GeoIP data in client locale

If you want to show the GeoIP data to the user and show them in the user locale, then you can use the reader factory.

Console commands

Update GeoIP database

Execute console command for update all databases:

If you use multiple databases, then for config:

You can update several databases:

Optionally installing splitbrain/php-archive uses significantly less memory when updating a database and can avoid out of memory errors:

Download GeoIP database

You can download custom database with console command:

License

This bundle is under the MIT license. See the complete license in the file: LICENSE


All versions of geoip2 with dependencies

PHP Build Version
Package Version
Requires ext-phar Version *
ext-zlib Version *
php Version >=7.2.0
geoip2/geoip2 Version ~2.0|~3.0
symfony/http-kernel Version ~2.8|~3.0|~4.0|~5.0|~6.0|~7.0
symfony/dependency-injection Version ~2.8|~3.0|~4.0|~5.0|~6.0|~7.0
symfony/expression-language Version ~2.8|~3.0|~4.0|~5.0|~6.0|~7.0
symfony/config Version ~2.8|~3.0|~4.0|~5.0|~6.0|~7.0
symfony/console Version ~2.8|~3.0|~4.0|~5.0|~6.0|~7.0
symfony/filesystem Version ~2.8|~3.0|~4.0|~5.0|~6.0|~7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gpslab/geoip2 contains the following files

Loading the files please wait ....