Download the PHP package dotkernel/dot-geoip without Composer
On this page you can find all versions of the php package dotkernel/dot-geoip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dot-geoip
dot-geoip
Dotkernel component to provide geographical details about an IP address
dot-geoip is a wrapper on top of maxmind/GeoIP2-php
Documentation
Documentation is available at: https://docs.dotkernel.org/dot-geoip/.
Badges
Install
You can install this library by running the following command:
If your application didn't already use it, the above command also installed dotkernel/dot-cli. In this case, see its README file on how to use it.
Copy config file vendor/dotkernel/dot-geoip/config/autoload/geoip.global.php into your application's config/autoload directory.
Register the library's ConfigProvider by adding the following line to your application's config/config.php file:
Register the library's synchronizer command by adding the following line to your application's config/autoload/cli.global.php file under the commands array key:
Manage GeoLite2 database
You can download/update a specific GeoLite2 database by running the following command:
Where {DATABASE} takes one of the following values: asn, city, country.
You can download/update all GeoLite2 databases at once by running the following command:
The output should be similar to the below, displaying per row: database identifier: previous build datetime -> current build datetime.
Get help for this command by running php ./bin/cli.php help geoip:synchronize.
If you set up the synchronizer command as a cronjob, you can add the
-q|--quietoption, and it will output data only if an error has occurred.
Usage
Below is an example implementation of using DotGeoip to retrieve information about an IP address.
All versions of dot-geoip with dependencies
ext-curl Version *
ext-zlib Version *
dotkernel/dot-cli Version ^3.5
geoip2/geoip2 Version ^3.0
psr/container Version ^1.1 || ^2.0.0