PHPackages                             g4/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. g4/geoip

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

g4/geoip
========

geoip php library

2.0.0(2y ago)253.8k↓33.3%5[1 PRs](https://github.com/g4code/geoip/pulls)MITPHPPHP &gt;=8.2

Since Nov 25Pushed 2y ago12 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (15)Used By (0)

geoip
=====

[](#geoip)

> geoip - [php](http://php.net) library

Install
-------

[](#install)

Via Composer

```
composer require g4/geoip
```

Requirements
------------

[](#requirements)

- PHP GeoIP extension
- Maxmind GeoIP database
- Maxmind GeoIP2-City database

Installing required packages (CentOS, Redhat)
---------------------------------------------

[](#installing-required-packages-centos-redhat)

- yum install GeoIP
- yum install GeoIP-devel
- yum install geoipupdate
- pecl install geoip

Usage
-----

[](#usage)

```
