PHPackages                             snapshotpl/zf-snap-geoip - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. snapshotpl/zf-snap-geoip

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

snapshotpl/zf-snap-geoip
========================

MaxMind GeoIP Module for Zend Framework 2

2.6.0(6y ago)1512.9k↓100%4[3 issues](https://github.com/snapshotpl/ZfSnapGeoip/issues)[1 PRs](https://github.com/snapshotpl/ZfSnapGeoip/pulls)BSD-3-ClausePHPPHP ^5.6 || ^7.0

Since Jul 15Pushed 6y ago4 watchersCompare

[ Source](https://github.com/snapshotpl/ZfSnapGeoip)[ Packagist](https://packagist.org/packages/snapshotpl/zf-snap-geoip)[ RSS](/packages/snapshotpl-zf-snap-geoip/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (21)Used By (0)

ZfSnapGeoip [![Build Status](https://camo.githubusercontent.com/b88406a0f5797e32ef9b575dfac979f866fe0711dd592ac07405957a524055bd/68747470733a2f2f7472617669732d63692e6f72672f736e617073686f74706c2f5a66536e617047656f69702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/snapshotpl/ZfSnapGeoip) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/b4ab452af66919b2db3fad6afe94f89c27422d8273aecac6207ffe6c2e87f7b3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736e617073686f74706c2f5a66536e617047656f69702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/snapshotpl/ZfSnapGeoip/?branch=master)
===============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#zfsnapgeoip--)

Maxmind Geoip module for Zend Framework 2

Created by Witold Wasiczko

Usage
-----

[](#usage)

Default ZfSnapGeoip returns Record object created by current user's IP address.

**In controller:**

```
$record = $this->getServiceLocator()->get('geoip')->getRecord();
echo $record->getCity();
```

```
$record = $this->getServiceLocator()->get('geoip')->getRecord('216.239.51.99');
echo $record->getLongitude();
echo $record->getLatitude();
```

**By view helper:**

Returns city name for current IP:

```

```

Returns country name for given IP:

```
