2017 © Pedro Peláez
 

library geoip

Supports Maxmind GeoIP services

image

riteshptl21/geoip

Supports Maxmind GeoIP services

  • Monday, August 1, 2016
  • by riteshptl21
  • Repository
  • 2 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Maxmind GeoIP2 API For Laravel 4.2

Description

Latest Stable Version Total Downloads, (*1)

Geoip is a Laravel package that aims to seamlessly integrate MaxMind functionality for determine the geographical location of IP addresses in laravel., (*2)

Installation

Add geoip to your composer.json file:, (*3)

"riteshptl21/geoip": "0.1.*", (*4)

You'll then need to run composer install to download it and have the autoloader updated., (*5)

Add the service provider to your Laravel application config:, (*6)

'Riteshptl21\Geoip\GeoipServiceProvider'

Create configuration file using artisan, (*7)

$ php artisan config:publish riteshptl21/geoip

Once you fire this command you see config file at app/config/packages/riteshptl21/geoip/config.php and set config at there., (*8)

Usage

Get the location data for a website visitor:, (*9)

$location = Geoip::getLocation();

When an IP is not given the $_SERVER["REMOTE_ADDR"] is used., (*10)

Getting the location data for a given IP:, (*11)

$location = Geoip::getLocation( '2.24.234.19' );

Note

In the case that a location is not found the fallback location will be returned with the default_location parameter that you set in config.By default default_location is like as under:, (*12)

array (
    "ip"            => "127.0.0.0",
    "isoCode"       => "IN",
    "country"       => "India",
    "city"          => "Ahmedabad",
    "state_code"    => "GJ",
    "postal_code"   => "261201",
    "lat"           => 23.0333,
    "lon"           => 72.6167,
    "timezone"      => "Asia/Kolkata",
    "continent"     => "AS",
    "default"       => true
)

The Versions

01/08 2016

dev-master

9999999-dev

Supports Maxmind GeoIP services

  Sources   Download

BSD 2-Clause

The Requires

 

by Ritesh Patel

laravel geoip geolocation laravel4 maxmind location

01/08 2016

0.1.2.1

0.1.2.1

Supports Maxmind GeoIP services

  Sources   Download

BSD 2-Clause

The Requires

 

by Ritesh Patel

laravel geoip geolocation laravel4 maxmind location

01/08 2016

0.1.2

0.1.2.0

Supports Maxmind GeoIP services

  Sources   Download

BSD 2-Clause

The Requires

 

by Ritesh Patel

laravel geoip geolocation laravel4 maxmind location

17/02 2016

0.1.1

0.1.1.0

Supports Maxmind GeoIP services

  Sources   Download

BSD 2-Clause

The Requires

 

by Ritesh Patel

laravel geoip geolocation laravel4 maxmind location