2017 © Pedro Peláez
 

symfony-bundle geoip-bundle

Raindrop GeoIP Symfony2 Bundle with Maxmind data source

image

raindrop/geoip-bundle

Raindrop GeoIP Symfony2 Bundle with Maxmind data source

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Raindrop GeoIp Bundle

Build Status, (*1)

To install this bundle please follow the next steps:, (*2)

First add the dependency to your composer.json file:, (*3)

"require": {
    ...
    "raindrop/geoip-bundle": "dev-master"
},

Then install the bundle with the command:, (*4)

php composer.phar update

Enable the bundle in your application kernel:, (*5)

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Raindrop\GeoipBundle\RaindropGeoipBundle(),
    );
}

Now the bundle is enabled., (*6)

This bundle use Maxmind[1] data source file (in '.dat' format)., (*7)

You can get the Maxmind data source file simply executing this command:, (*8)

php app/console raindrop:geoip:update-data %url-data-source%

Replace %url-data-source% with the url of the needed data source. ex: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz, (*9)

Now can use the Raindrop GeoIp Bundle everywhere in your Symfony2 application., (*10)

You can lookup an IP address with:, (*11)

$geoip = $this->get('raindrop.geoip')->lookup(%IP_ADDR%);

and these are the available methods:, (*12)

$geoip->getCountryCode();
$geoip->getCountryCode3();
$geoip->getCountryName();
$geoip->getRegion();
$geoip->getCity();
$geoip->getPostalCode();
$geoip->getLatitude();
$geoip->getLongitude();
$geoip->getAreaCode();
$geoip->getMetroCode();
$geoip->getContinentCode();

This library is an import of [Maxmind GeoIp Free Library][1]., (*13)

The Versions

03/05 2013

dev-master

9999999-dev https://github.com/raindropdevs

Raindrop GeoIP Symfony2 Bundle with Maxmind data source

  Sources   Download

MIT

The Requires

 

geoip maxmind

03/05 2013

dev-develop

dev-develop https://github.com/raindropdevs

Raindrop GeoIP Symfony2 Bundle with Maxmind data source

  Sources   Download

MIT

The Requires

 

geoip maxmind

03/02 2013

01.02.00

01.02.00.0

Raindrop GeoIP Symfony2 Bundle with Maxmind data source

  Sources   Download

MIT

The Requires

 

geoip symfony2 maxmind

31/01 2013

01.01.00

01.01.00.0

Raindrop GeoIP Symfony2 Bundle with Maxmind data source

  Sources   Download

MIT

The Requires

 

geoip symfony2 maxmind