2017 © Pedro Peláez
 

library l4-geoip

Laravel 4 Library for detecting geogpraphical location info.

image

d3catalyst/l4-geoip

Laravel 4 Library for detecting geogpraphical location info.

  • Thursday, July 31, 2014
  • by d3v1an
  • Repository
  • 3 Watchers
  • 4 Stars
  • 2,263 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

laravel-4-geoip

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality, (*1)

Laravel 4 Library for calling http://ip-api.com/ API., (*2)

In contrary to all other packages wherein it requires that you have the geoip database in your filesystem, this library calls a free service So you dont really have to worry about downloading and maintaining geoip data from Maxmind in your own server., (*3)

Just install the package, add the config and it is ready to use!, (*4)

Requirements

  • PHP >= 5.3.7
  • cURL Extension

Installation

Add in composer.json
"d3catalyst/l4-geoip": "dev-master"

Add the service provider and facade in your config/app.php, (*5)

Service Provider, (*6)

D3Catalyst\GeoIP\Laravel4\ServiceProviders\GeoIPServiceProvider

Facade, (*7)

'GeoIP'            => 'D3Catalyst\GeoIP\Laravel4\Facades\GeoIP',

Usage

Set IP of the visitor (Optional), (*8)

GeoIP::setIp("127.0.0.1");  // Optional set ip, when not set this take automatical from REMOTE_HOST

Get country of the visitor, (*9)

GeoIP::getCountry();  // returns "United States"

Get country code of the visitor, (*10)

GeoIP::getCountryCode();  // returns "US"

Get region of the visitor, (*11)

GeoIP::getRegion();  // returns "New York"

Get region code of the visitor, (*12)

GeoIP::getRegionCode();  // returns "NY"

Get city of the visitor, (*13)

GeoIP::getCity();  // returns "Buffalo"

Get zip code of the visitor, (*14)

GeoIP::getZipCode();  // returns "14221"

Get latitude of the visitor, (*15)

GeoIP::getLatitude();  // returns "42.9864"

Get longitude of the visitor, (*16)

GeoIP::getLongitude();  // returns "-78.7279"

Get timezone of the visitor, (*17)

GeoIP::getTimezone();  // returns "America/Mexico_City"

Get ISP of the visitor, (*18)

GeoIP::getIsp();  // returns "Internet Service provider"

Get ALL geo information of visitor, (*19)

GeoIP::getAll();  // returns array with all information

The Versions

31/07 2014

dev-master

9999999-dev http://laravel.d3catalyst.com/l4-geoip/

Laravel 4 Library for detecting geogpraphical location info.

  Sources   Download

MIT

The Requires

  • php >=5.3.7
  • ext-curl *
  • lib-curl *

 

The Development Requires

by Darwin Biler
by Ricardo Madrigal

geoip ip to location retrieve location no local geodatabase required d3catalyst.com ip information

29/07 2014

1.0.1

1.0.1.0 http://laravel.d3catalyst.com/l4-geoip/

Laravel 4 Library for detecting geogpraphical location info.

  Sources   Download

MIT

The Requires

  • php >=5.3.7
  • ext-curl *
  • lib-curl *

 

The Development Requires

by Darwin Biler
by Ricardo Madrigal

geoip ip to location retrieve location no local geodatabase required d3catalyst.com ip information