New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

d3catalyst/l4-geoip

Laravel 4 Library for detecting geogpraphical location info.
2,716 4

Larablocks Analysis

d3catalyst/l4-geoip works with any PHP project: the latest release (1.0.1, Jul 28, 2014) doesn't depend on Laravel.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • No release in the last 12 months (last: Jul 28, 2014)
  • 0 downloads a month (needs 10,000)
  • 4 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Jul 28, 2014.
  • No releases in the last 12 months.
  • First released: Jul 28, 2014.
  • 1 open issue on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.

Install
composer require d3catalyst/l4-geoip
Latest Version:1.0.1
PHP:>=5.3.7
License:MIT
Last Updated:Jul 31, 2014
Links: GitHub  ·  Packagist
Maintainer: d3v1an

laravel-4-geoip

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Scrutinizer Code Quality

Laravel 4 Library for calling http://ip-api.com/ API.

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.

Just install the package, add the config and it is ready to use!

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

Service Provider

D3Catalyst\GeoIP\Laravel4\ServiceProviders\GeoIPServiceProvider

Facade

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

Usage

Set IP of the visitor (Optional)

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

Get country of the visitor

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

Get country code of the visitor

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

Get region of the visitor

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

Get region code of the visitor

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

Get city of the visitor

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

Get zip code of the visitor

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

Get latitude of the visitor

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

Get longitude of the visitor

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

Get timezone of the visitor

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

Get ISP of the visitor

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

Get ALL geo information of visitor

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

Related Packages

najibismail/multigeoip

Get IP address information from multi geoip providers

1,376 0
larva/laravel-geoip

GeoIP Extension for Laravel.

1,013 2
larva/laravel-ip2region

This is a ip2region.

34,615 1
duylangbk/lumen-geoip

GeoIP for Lumen

953 0
eseath/sypexgeo

A PHP package for working with the SypexGeo database file.

216,062 11

Version History

Version Released PHP License
1.0.1 >=5.3.7 MIT