2017 © Pedro Peláez
 

library geoip

geoip php library

image

g4/geoip

geoip php library

  • Monday, July 16, 2018
  • by g4code
  • Repository
  • 12 Watchers
  • 0 Stars
  • 6,259 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 9 % Grown

The README.md

geoip

geoip - php library, (*1)

Install

Via Composer, (*2)

composer require g4/geoip

Requirements

  • PHP GeoIP extension http://php.net/manual/en/geoip.setup.php
  • Maxmind GeoIP database http://dev.maxmind.com/
  • Maxmind GeoIP2-City database

Installing required packages (CentOS, Redhat)

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

Usage

``` php <?php, (*3)

$geoIp = new \G4\GeoIP\GeoIP('127.0.0.1');, (*4)

// "area_code" -- The PSTN area code (ex: 212) echo $geoIp->getAreaCode();, (*5)

// "dma_code" -- Designated Market Area code (USA and Canada only) echo $geoIp->getDmaCode();, (*6)

// "city" -- The city echo $geoIp->getCity();, (*7)

// "continent_code" -- Two letter continent code echo $geoIp->getContinentCode();, (*8)

// "country_code" -- Two letter country code echo $geoIp->getCountryCode();, (*9)

// "country_code3" -- Three letter country code echo $geoIp->getCountryCode3();, (*10)

// "country_name" -- The country name echo $geoIp->getCountryName();, (*11)

// IP address echo $geoIp->getIp();, (*12)

// "latitude" -- The Latitude as signed double echo $geoIp->getLatitude();, (*13)

// "longitude" -- The Longitude as signed double echo $geoIp->getLongitude();, (*14)

// "postal_code" -- The Postal Code, FSA or Zip Code echo $geoIp->getPostalCode();, (*15)

// "region" -- The region code (ex: CA for California) echo $geoIp->getRegion();, (*16)

```, (*17)

geoip_record_by_name, (*18)

Development

Install dependencies

$ make install

Run tests

$ make test

License

(The MIT License) see LICENSE file for details..., (*19)

The Versions

16/07 2018

dev-master

9999999-dev

geoip php library

  Sources   Download

MIT

The Requires

 

The Development Requires

geoip geo ip location

16/07 2018

dev-develop

dev-develop

geoip php library

  Sources   Download

MIT

The Requires

 

The Development Requires

geoip geo ip location

16/07 2018

1.0.8

1.0.8.0

geoip php library

  Sources   Download

MIT

The Requires

 

The Development Requires

geoip geo ip location

22/01 2016

1.0.7

1.0.7.0

geoip php library

  Sources   Download

MIT

The Requires

 

The Development Requires

geoip geo ip location

25/12 2015

1.0.6

1.0.6.0

geoip php library

  Sources   Download

MIT

The Requires

  • ext-geoip *

 

The Development Requires

geoip geo ip location

25/12 2014

1.0.5

1.0.5.0

geoip php library

  Sources   Download

MIT

The Requires

  • ext-geoip *

 

The Development Requires

geoip geo ip location

03/12 2014

1.0.4

1.0.4.0

geoip php library

  Sources   Download

MIT

The Requires

  • ext-geoip *

 

The Development Requires

geoip geo ip location

25/11 2014

1.0.3

1.0.3.0

geoip php library

  Sources   Download

MIT

The Requires

  • ext-geoip *

 

The Development Requires

geoip geo ip location

25/11 2014

1.0.2

1.0.2.0

geoip php library

  Sources   Download

MIT

The Requires

  • ext-geoip *

 

The Development Requires

geoip geo ip location

25/11 2014

1.0.1

1.0.1.0

geoip php library

  Sources   Download

MIT

The Requires

  • ext-geoip *

 

The Development Requires

geoip geo ip location

25/11 2014

1.0.0

1.0.0.0

geoip php library

  Sources   Download

MIT

The Requires

  • ext-geoip *

 

The Development Requires

geoip geo ip location