2017 © Pedro Peláez
 

library yer

PHP Geolocation Library

image

eabay/yer

PHP Geolocation Library

  • Tuesday, August 7, 2012
  • by eabay
  • Repository
  • 2 Watchers
  • 8 Stars
  • 772 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

What is Yer?

Yer is a PHP geolocation library., (*1)

Usage

Install it via composer eabay/yer, (*2)

Locator Providers

Geobytes

``` php <?php require_once DIR.'/vendor/autoload.php';, (*3)

$geolocation = new Yer\Geolocation; $geolocation->setLocator(new Yer\Locator\GeobytesLocator());, (*4)

var_dump($geolocation->lookup('193.140.215.133'));, (*5)


You can turn ssl on/off: ``` php <?php ... $geolocation->setLocator(new Yer\Locator\GeobytesLocator(true));

If you have a paid subscription, ``` php <?php ... $geolocation->setLocator(new Yer\Locator\GeobytesLocator(true /* or false */, 'your email', 'your password'));, (*6)


#### `MaxMind` ``` php <?php ... $geolocation->setLocator(new Yer\Locator\MaxMindWebServiceLocator('your license key'));

You can use your custom locator providers by implementing Yer\Locator\LocatorInterface., (*7)

IP Address Validation

You can validate IP address before query to the locator provider php <?php ... $geolocation->setIpValidator(new Yer\Validator\IpValidator()), (*8)

If you want to use your own validator implement Yer\Validator\ValidatorInterface, (*9)

The Versions

07/08 2012

dev-master

9999999-dev https://github.com/eabay/yer

PHP Geolocation Library

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

geolocation maxmind geobytes