Download the PHP package jroedel/zf-snap-geoip without Composer

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

ZfSnapGeoip Build Status Scrutinizer Code Quality

Maxmind Geoip module for Zend Framework 2

Created by Witold Wasiczko

Usage

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

In controller:

By view helper:

Returns city name for current IP:

Returns country name for given IP:

You can also implements \ZfSnapGeoip\IpAwareInterface interface and then use instance in service/helper:

Avaliable getter methods via \ZfSnapGeoip\Entity\Record:

Events

Module supports \Zend\EventManager.

Class Event name Description Params
ZfSnapGeoip\Controller\ConsoleController downloadAction.exists If no-clobber is enabled and file exists path (to dat file)
ZfSnapGeoip\Controller\ConsoleController downloadAction.pre Before unzip file path (to dat file), response (gziped response object)
ZfSnapGeoip\Controller\ConsoleController downloadAction.post After unzip file path (to dat file)
ZfSnapGeoip\Service\Geoip getIp After read IP ip (ip address)
ZfSnapGeoip\Service\Geoip getRecord After created record record (instance of ZfSnapGeoip\Entity\RecordInterface)
ZfSnapGeoip\Service\Geoip getRegions After first loading regions names regions

How to install?

Via composer.json

and add ZfSnapGeoip module name to application.config.php

To download data file from http://dev.maxmind.com/geoip/legacy/geolite/ use Zend\Console (you can add this to crontab):

Or use autoupdate database during install/update in composer (just add this lines to composer.json and run composer):

Console usage

You can download GeoIP database from application console:

There are optional parameters:


All versions of zf-snap-geoip with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0
geoip/geoip Version ^1.17
zendframework/zend-mvc Version ^3.0
zendframework/zend-modulemanager Version ^2.7
zendframework/zend-servicemanager Version ^3.3
zendframework/zend-eventmanager Version ^3.1
zendframework/zend-console Version ^2.6
zendframework/zend-view Version ^2.8
zendframework/zend-hydrator Version ^2.2
zendframework/zend-filter Version ^2.7
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 jroedel/zf-snap-geoip contains the following files

Loading the files please wait ....