2017 © Pedro Peláez
 

library geoipcountryprovider

Geocoder GeoIP provider that works with the default GeoIP database

image

jalle19/geoipcountryprovider

Geocoder GeoIP provider that works with the default GeoIP database

  • Tuesday, July 23, 2013
  • by Jalle19
  • Repository
  • 1 Watchers
  • 0 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

GeoipCountryProvider

Geocoder GeoIP provider that works with the default GeoIP database. This means that you can use this provider to determine the country of a visitor simply by installing php5-geoip (or equivalent package)., (*1)

Usage

$geocoder = new \Geocoder\Geocoder();
$geocoder->registerProvider(new \GeoipCountryProvider\GeoipCountryProvider());

var_dump($geocoder->geocode('8.8.8.8'));

// Output:
// 
// object(Geocoder\Result\Geocoded)[55]
//   protected 'latitude' => int 0
//   protected 'longitude' => int 0
//   protected 'bounds' => null
//   protected 'streetNumber' => null
//   protected 'streetName' => null
//   protected 'cityDistrict' => null
//   protected 'city' => null
//   protected 'zipcode' => null
//   protected 'county' => null
//   protected 'countyCode' => null
//   protected 'region' => null
//   protected 'regionCode' => null
//   protected 'country' => string 'United States' (length=13)
//   protected 'countryCode' => string 'US' (length=2)
//   protected 'timezone' => null

The Versions

23/07 2013

dev-master

9999999-dev

Geocoder GeoIP provider that works with the default GeoIP database

  Sources   Download

MIT

The Requires

 

geoip geocoder

23/07 2013

1.0.0

1.0.0.0

Geocoder GeoIP provider that works with the default GeoIP database

  Sources   Download

MIT

The Requires

 

geoip geocoder