Download the PHP package vnagara/geoip-module without Composer

On this page you can find all versions of the php package vnagara/geoip-module. 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 geoip-module

README

PROLOGUE

My project demands on detecting and storing accessed IP data.
So I found geoip/geoip package. And everything else is to store it.
The best way is serialize or create record in DB. The second way with Doctrine 2 is very slow as appeared in my experience.

Why not geoip2/geoip2 or MaxMind-DB-Reader-php with .mmdb

Really? It contains wished class Record for serialization already but: As experiment showed:

So I decided to create alternate Record object that will utilize fast geoip sqlite db and fit to
now-day Object using. It easily can be extended to Doctrine Entity or Document.

How to install

Install it by composer.

{
    "require": {
        "vnagara/geoip-module": "1.*"
    }
}

Download geoip sql DB to data/GeoLiteCity.dat or set another path in configuration file.
On linux with wget you can use this command (inside project root):

    wget -O - http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | gzip -dc > data/GeoLiteCity.dat

In application.config.php enable GeoipModule module.

New methods:

  1. In view helpers: geoipRecord($ipAddress) will return GeoipRecord.
  2. There is new service geoip. So in controller it is accessible by:

    /** @var \GeoipModule\Service\Geoip */
    $geoip = $this->getServiceLocator()->get('geoip');
    
    /** @var \GeoipModule\Object\Record */
    $recordOfSomeIpAddress = $geoip->find('184.154.227.14');
    $city = $recordOfSomeIpAddress->getCity();  // Chicago
    
    // The same:
    $recordOfSomeIpAddress = $geoip->lookup('184.154.227.14');
    
    // To use ip from $_SERVER['REMOTE_ADDR']
    $record = $geoip->find();

Doctrine ORM

Template of Entity with annotation lays by path: src/GeoipModule/Entity/Record.php


All versions of geoip-module with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
geoip/geoip Version ~1.13
zendframework/zend-stdlib Version ~2.2.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 vnagara/geoip-module contains the following files

Loading the files please wait ...