geolocation/freegeoip

ZF2 Geolocation module

dev-master 2014-08-16 04:59 UTC

This package is not auto-updated.

Last update: 2025-01-28 05:31:58 UTC


README

Geolocation - ZF2 Module

A zend framework 2 module for geolocation.

Installation

Main Setup

By cloning project

  1. This module is available on Packagist. In your project's composer.json use:

    {   
        "require": {
    		"php": ">=5.3.3",
    		"zendframework/zendframework": "*",
    		"geolocation/freegeoip": "dev-master"
    }
  2. Or clone this project into your ./vendor/ directory.

Usage:

  1. In the controller

     $geoloc = $this->getServiceLocator()->get('Geolocation\Service\Geolocation'); 
     $geoloc->setIp( $ip);                                        
     $result = $geoloc->getLocation();