2017 © Pedro Peláez
 

library geoip2

Maxmind GeoIP 2 toolkit for Symfony 2

image

bonvga/geoip2

Maxmind GeoIP 2 toolkit for Symfony 2

  • Tuesday, May 24, 2016
  • by bonvga
  • Repository
  • 2 Watchers
  • 1 Stars
  • 10,340 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Bonvga/Geoip2Bundle

This Symfony 2 bundle is a helper for Maxmind Geocity2 database installation., (*1)

Requirements

You need the Curl binary package. (https://curl.haxx.se/), (*2)

Installation

  1. Add the Geoip2Bundle to your dependencies:, (*3)

    // composer.json
    
    {
       // ...
       "require": {
           // ...
           "bonvga/geoip2": "1.*"
       }
    }
  2. Use Composer to download and install the Geoip2Bundle:, (*4)

    $ php composer.phar update bonvga/geoip2
  3. Register the bundle in your application:, (*5)

    // app/AppKernel.php
    
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Bonvga\Bundle\Geoip2Bundle\Geoip2Bundle()
        );
    }
  4. Optional, updating Maxmind Geocity2 database during composer, (*6)

    // composer.json
    
    "scripts": {
        "post-install-cmd": [
            "Bonvga\\Bundle\\Geoip2Bundle\\Composer\\ScriptHandler::installDatabase"
        ],
        "post-update-cmd": [
            "Bonvga\\Bundle\\Geoip2Bundle\\Composer\\ScriptHandler::installDatabase"
        ]
    },
    
    // or with command
    
    $ php app/console bonvga:geoip2_database_update

Usage

With the geoip2/geoip2 bundle :, (*7)

    // composer requirement
    "geoip2/geoip2": "~2.0"

Or see https://packagist.org/packages/geoip2/geoip2, (*8)

    // PHP sample

    use Bonvga\Bundle\Geoip2Bundle\Lib\Geoip2Manager;
    use GeoIp2\Database\Reader;

    $reader = new Reader(Geoip2Manager::getGeoip2LiteCityDatabasePath());

The Versions

24/05 2016

dev-master

9999999-dev

Maxmind GeoIP 2 toolkit for Symfony 2

  Sources   Download

LGPL 3.0

The Requires

 

geoip geolocation maxmind

24/05 2016

1.1

1.1.0.0

Maxmind GeoIP 2 toolkit for Symfony 2

  Sources   Download

LGPL 3.0

The Requires

 

geoip geolocation maxmind

15/09 2015

1.0

1.0.0.0

Maxmind GeoIP 2 toolkit for Symfony 2

  Sources   Download

LGPL 3.0

The Requires

 

geoip geolocation maxmind