PHP API for GeoIP2 webservice client and database reader

Overview

GeoIP2 PHP API

Description

This package provides an API for the GeoIP2 and GeoLite2 web services and databases.

Install via Composer

We recommend installing this package with Composer.

Download Composer

To download Composer, run in the root directory of your project:

curl -sS https://getcomposer.org/installer | php

You should now have the file composer.phar in your project directory.

Install Dependencies

Run in your project root:

php composer.phar require geoip2/geoip2:~2.0

You should now have the files composer.json and composer.lock as well as the directory vendor in your project directory. If you use a version control system, composer.json should be added to it.

Require Autoloader

After installing the dependencies, you need to require the Composer autoloader from your code:

require 'vendor/autoload.php';

Install via Phar

Although we strongly recommend using Composer, we also provide a phar archive containing most of the dependencies for GeoIP2. Our latest phar archive is available on our releases page.

Install Dependencies

In order to use the phar archive, you must have the PHP Phar extension installed and enabled.

If you will be making web service requests, you must have the PHP cURL extension installed to use this archive. For Debian based distributions, this can typically be found in the the php-curl package. For other operating systems, please consult the relevant documentation. After installing the extension you may need to restart your web server.

If you are missing this extension, you will see errors like the following:

PHP Fatal error:  Uncaught Error: Call to undefined function MaxMind\WebService\curl_version()

Require Package

To use the archive, just require it from your script:

require 'geoip2.phar';

Optional C Extension

The MaxMind DB API includes an optional C extension that you may install to dramatically increase the performance of lookups in GeoIP2 or GeoLite2 databases. To install, please follow the instructions included with that API.

The extension has no effect on web-service lookups.

IP Geolocation Usage

IP geolocation is inherently imprecise. Locations are often near the center of the population. Any location provided by a GeoIP2 database or web service should not be used to identify a particular address or household.

Database Reader

Usage

To use this API, you must create a new \GeoIp2\Database\Reader object with the path to the database file as the first argument to the constructor. You may then call the method corresponding to the database you are using.

If the lookup succeeds, the method call will return a model class for the record in the database. This model in turn contains multiple container classes for the different parts of the data such as the city in which the IP address is located.

If the record is not found, a \GeoIp2\Exception\AddressNotFoundException is thrown. If the database is invalid or corrupt, a \MaxMind\Db\InvalidDatabaseException will be thrown.

See the API documentation for more details.

City Example

<?php
require_once 'vendor/autoload.php';
use GeoIp2\Database\Reader;

// This creates the Reader object, which should be reused across
// lookups.
$reader = new Reader('/usr/local/share/GeoIP/GeoIP2-City.mmdb');

// Replace "city" with the appropriate method for your database, e.g.,
// "country".
$record = $reader->city('128.101.101.101');

print($record->country->isoCode . "\n"); // 'US'
print($record->country->name . "\n"); // 'United States'
print($record->country->names['zh-CN'] . "\n"); // '美国'

print($record->mostSpecificSubdivision->name . "\n"); // 'Minnesota'
print($record->mostSpecificSubdivision->isoCode . "\n"); // 'MN'

print($record->city->name . "\n"); // 'Minneapolis'

print($record->postal->code . "\n"); // '55455'

print($record->location->latitude . "\n"); // 44.9733
print($record->location->longitude . "\n"); // -93.2323

print($record->traits->network . "\n"); // '128.101.101.101/32'

Anonymous IP Example

<?php
require_once 'vendor/autoload.php';
use GeoIp2\Database\Reader;

// This creates the Reader object, which should be reused across
// lookups.
$reader = new Reader('/usr/local/share/GeoIP/GeoIP2-Anonymous-IP.mmdb');

$record = $reader->anonymousIp('128.101.101.101');

if ($record->isAnonymous) { print "anon\n"; }
print($record->ipAddress . "\n"); // '128.101.101.101'
print($record->network . "\n"); // '128.101.101.101/32'

Connection-Type Example

<?php
require_once 'vendor/autoload.php';
use GeoIp2\Database\Reader;

// This creates the Reader object, which should be reused across
// lookups.
$reader = new Reader('/usr/local/share/GeoIP/GeoIP2-Connection-Type.mmdb');

$record = $reader->connectionType('128.101.101.101');

print($record->connectionType . "\n"); // 'Corporate'
print($record->ipAddress . "\n"); // '128.101.101.101'
print($record->network . "\n"); // '128.101.101.101/32'

Domain Example

<?php
require_once 'vendor/autoload.php';
use GeoIp2\Database\Reader;

// This creates the Reader object, which should be reused across
// lookups.
$reader = new Reader('/usr/local/share/GeoIP/GeoIP2-Domain.mmdb');

$record = $reader->domain('128.101.101.101');

print($record->domain . "\n"); // 'umn.edu'
print($record->ipAddress . "\n"); // '128.101.101.101'
print($record->network . "\n"); // '128.101.101.101/32'

Enterprise Example

<?php
require_once 'vendor/autoload.php';
use GeoIp2\Database\Reader;

// This creates the Reader object, which should be reused across
// lookups.
$reader = new Reader('/usr/local/share/GeoIP/GeoIP2-Enterprise.mmdb');

// Use the ->enterprise method to do a lookup in the Enterprise database
$record = $reader->enterprise('128.101.101.101');

print($record->country->confidence . "\n"); // 99
print($record->country->isoCode . "\n"); // 'US'
print($record->country->name . "\n"); // 'United States'
print($record->country->names['zh-CN'] . "\n"); // '美国'

print($record->mostSpecificSubdivision->confidence . "\n"); // 77
print($record->mostSpecificSubdivision->name . "\n"); // 'Minnesota'
print($record->mostSpecificSubdivision->isoCode . "\n"); // 'MN'

print($record->city->confidence . "\n"); // 60
print($record->city->name . "\n"); // 'Minneapolis'

print($record->postal->code . "\n"); // '55455'

print($record->location->accuracyRadius . "\n"); // 50
print($record->location->latitude . "\n"); // 44.9733
print($record->location->longitude . "\n"); // -93.2323

print($record->traits->network . "\n"); // '128.101.101.101/32'

ISP Example

<?php
require_once 'vendor/autoload.php';
use GeoIp2\Database\Reader;

// This creates the Reader object, which should be reused across
// lookups.
$reader = new Reader('/usr/local/share/GeoIP/GeoIP2-ISP.mmdb');

$record = $reader->isp('128.101.101.101');

print($record->autonomousSystemNumber . "\n"); // 217
print($record->autonomousSystemOrganization . "\n"); // 'University of Minnesota'
print($record->isp . "\n"); // 'University of Minnesota'
print($record->organization . "\n"); // 'University of Minnesota'

print($record->ipAddress . "\n"); // '128.101.101.101'
print($record->network . "\n"); // '128.101.101.101/32'

Database Updates

You can keep your databases up to date with our GeoIP Update program. Learn more about GeoIP Update on our developer portal.

There is also a third-party tool for updating databases using PHP and Composer. MaxMind does not offer support for this tool or maintain it. Learn more about the Geoip2 Update tool for PHP and Composer on its GitHub page.

Web Service Client

Usage

To use this API, you must create a new \GeoIp2\WebService\Client object with your $accountId and $licenseKey:

$client = new Client(42, 'abcdef123456');

You may also call the constructor with additional arguments. The third argument specifies the language preferences when using the ->name method on the model classes that this client creates. The fourth argument is additional options such as host and timeout.

For instance, to call the GeoLite2 web service instead of the GeoIP2 web service:

$client = new Client(42, 'abcdef123456', ['en'], ['host' => 'geolite.info']);

After creating the client, you may now call the method corresponding to a specific endpoint with the IP address to look up, e.g.:

$record = $client->city('128.101.101.101');

If the request succeeds, the method call will return a model class for the endpoint you called. This model in turn contains multiple record classes, each of which represents part of the data returned by the web service.

If there is an error, a structured exception is thrown.

See the API documentation for more details.

Example

<?php
require_once 'vendor/autoload.php';
use GeoIp2\WebService\Client;

// This creates a Client object that can be reused across requests.
// Replace "42" with your account ID and "license_key" with your license
// key. Set the "host" to "geolite.info" in the fourth argument options
// array to use the GeoLite2 web service instead of the GeoIP2 web
// service.
$client = new Client(42, 'abcdef123456');

// Replace "city" with the method corresponding to the web service that
// you are using, e.g., "country", "insights".
$record = $client->city('128.101.101.101');

print($record->country->isoCode . "\n"); // 'US'
print($record->country->name . "\n"); // 'United States'
print($record->country->names['zh-CN'] . "\n"); // '美国'

print($record->mostSpecificSubdivision->name . "\n"); // 'Minnesota'
print($record->mostSpecificSubdivision->isoCode . "\n"); // 'MN'

print($record->city->name . "\n"); // 'Minneapolis'

print($record->postal->code . "\n"); // '55455'

print($record->location->latitude . "\n"); // 44.9733
print($record->location->longitude . "\n"); // -93.2323

print($record->traits->network . "\n"); // '128.101.101.101/32'

Values to use for Database or Array Keys

We strongly discourage you from using a value from any names property as a key in a database or array.

These names may change between releases. Instead we recommend using one of the following:

  • GeoIp2\Record\City - $city->geonameId
  • GeoIp2\Record\Continent - $continent->code or $continent->geonameId
  • GeoIp2\Record\Country and GeoIp2\Record\RepresentedCountry - $country->isoCode or $country->geonameId
  • GeoIp2\Record\Subdivision - $subdivision->isoCode or $subdivision->geonameId

What data is returned?

While many of the end points return the same basic records, the attributes which can be populated vary between end points. In addition, while an end point may offer a particular piece of data, MaxMind does not always have every piece of data for any given IP address.

Because of these factors, it is possible for any end point to return a record where some or all of the attributes are unpopulated.

See the GeoIP2 web service docs for details on what data each end point may return.

The only piece of data which is always returned is the ipAddress attribute in the GeoIp2\Record\Traits record.

Integration with GeoNames

GeoNames offers web services and downloadable databases with data on geographical features around the world, including populated places. They offer both free and paid premium data. Each feature is unique identified by a geonameId, which is an integer.

Many of the records returned by the GeoIP2 web services and databases include a geonameId property. This is the ID of a geographical feature (city, region, country, etc.) in the GeoNames database.

Some of the data that MaxMind provides is also sourced from GeoNames. We source things like place names, ISO codes, and other similar data from the GeoNames premium data set.

Reporting data problems

If the problem you find is that an IP address is incorrectly mapped, please submit your correction to MaxMind.

If you find some other sort of mistake, like an incorrect spelling, please check the GeoNames site first. Once you've searched for a place and found it on the GeoNames map view, there are a number of links you can use to correct data ("move", "edit", "alternate names", etc.). Once the correction is part of the GeoNames data set, it will be automatically incorporated into future MaxMind releases.

If you are a paying MaxMind customer and you're not sure where to submit a correction, please contact MaxMind support for help.

Other Support

Please report all issues with this code using the GitHub issue tracker.

If you are having an issue with a MaxMind service that is not specific to the client API, please see our support page.

Requirements

This library requires PHP 7.2 or greater.

This library also relies on the MaxMind DB Reader.

Contributing

Patches and pull requests are encouraged. All code should follow the PSR-2 style guidelines. Please include unit tests whenever possible. You may obtain the test data for the maxmind-db folder by running git submodule update --init --recursive or adding --recursive to your initial clone, or from https://github.com/maxmind/MaxMind-DB

Versioning

The GeoIP2 PHP API uses Semantic Versioning.

Copyright and License

This software is Copyright (c) 2013-2020 by MaxMind, Inc.

This is free software, licensed under the Apache License, Version 2.0.

Comments
  • cURL error (77): error setting certificate verify locations:

    cURL error (77): error setting certificate verify locations:

    Lately, I've been getting this error: Uncaught MaxMind\Exception\HttpException: cURL error (77): error setting certificate verify locations:

    I've tried downloading certs from http://curl.haxx.se/ca/cacert.pem and installing them on my Ubuntu 16.04 system in /etc/ssl/certs, but it does not fix the problem.

    I've also tried setting curl.cainfo="/etc/ssl/certs/cacert.pem" in my php.ini and that makes no difference.

    If I edit the MaxMind\Webservice\Http\CurlRequest.php file and set CURLOPT_SSL_VERIFYPEER to false, it starts working again. However, this is not the best solution.

    opened by lfjeff 23
  • SSL: certificate verification failed on OS X 10.11.6

    SSL: certificate verification failed on OS X 10.11.6

    Getting an exception:

    'MaxMind\Exception\HttpException' with message 'cURL error (51): SSL: certificate verification failed (result: 5)'
    

    This only happens locally on OS X El Capitan (10.11.6) and It might have to do with the SSL version used by php and/or curl (SecureTransport instead of OpenSSL).

    php -i | grep "SSL Version"
    SSL Version => SecureTransport
    

    While looking for a workaround, I tried specifying another cacert.pem in new Client() and it worked out. The cacert.pem used was the one provided by composer residing in ~/.composer/cacert.pem

    opened by monyiliev 14
  • GeoIP2-php requires a deprecated dependency

    GeoIP2-php requires a deprecated dependency

    GeoIP2 package uses a deprecated library. Installation via composer shows the following message:

    guzzle/guzzle suggests installing guzzlehttp/guzzle (Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated.)

    opened by MiguelCP 14
  • Autoload unavailable

    Autoload unavailable

    Hi,

    I have not been able to install "vendor autoload" and I don't want to because when I will transfer my website onto a hosted 1&1 platform, I will not have composer or php available for GeoIp2 installation. I am also developping under Windows.

    Therefore, I tried to use require_once with each library contained inside the src/GeoIp2/

    require_once 'GeoIp2/ProviderInterface.php'; require_once 'GeoIp2/JsonSerializable.php';

    require_once 'GeoIp2/Exception/GeoIp2Exception.php'; require_once 'GeoIp2/Exception/HttpException.php'; require_once 'GeoIp2/Exception/AddressNotFoundException.php'; require_once 'GeoIp2/Exception/InvalidRequestException.php';

    require_once 'GeoIp2/Model/Country.php'; require_once 'GeoIp2/Model/City.php'; require_once 'GeoIp2/Model/CityIspOrg.php'; require_once 'GeoIp2/Model/Omni.php';

    require_once 'GeoIp2/Database/Reader.php';

    use GeoIp2\Database\Reader;

    function GetGeoIp2Array(){ $reader = new Reader('GeoIP2-City.mmdb'); $record = $reader->city($_SERVER['REMOTE_ADDR']); $reader->close();

    $localisation_array = array( "Country" => (string)$record->country->name, "CountryCode" => (string)$record->country->isoCode, "ContinentCode" => (string)$record->continent->code, "RegionCode" => (string)$record->mostSpecificSubdivision->isoCode, "Region" => (string)$record->mostSpecificSubdivision->name, "Latitude" => (string)$record->location->latitude, "Longitude" => (string)$record->location->longitude, "MetroCode" => (string)$record->mostSpecificSubdivision->isoCode, "ZipCode" => (string)$record->postal->code, "City" => $record->city->name, ); return $localisation_array; }

    And I still get this error when executing : Fatal error: Class 'MaxMind\Db\Reader' not found in my_web_folder\geolocalisation\GeoIp2\Database\Reader.php on line 56

    If I replace the use directive by the one suggested in the error above, I get this error : Fatal error: Class 'MaxMind\Db\Reader' not found in my_web_folder\geolocalisation\geolocalisation_by_city.php on line 44

    Could you please help me :

    • have the right "require" order
    • have the right "use" namespaces in order to make it work without installing composer.

    Thanks very much.

    opened by jgarino 14
  • Package Issue

    Package Issue

    Hi,

    We updated the latest version of GeoIP2 package, we are using PHP 8 and we got this error from package

    Deprecated: Return type of GeoIp2\Model\AbstractModel::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /vendor/geoip2/geoip2/src/Model/AbstractModel.php on line 63

    for the older version if we pass the IP address as local IPs like 192.168.1.2 the return was blank but for the latest version it is giving fatal error

    Fatal error: Uncaught GeoIp2\Exception\AddressNotFoundException: The address 192.168.1.8 is not in the database

    Can you please check with this?

    opened by gokulmhegde 10
  • geoip2.phar 2.12.1: PHP website does not work

    geoip2.phar 2.12.1: PHP website does not work

    After geoip2.phar 2.12.0 used with PHP produced the error message: The application may only be invoked from a command line, got "fpm-fcgi", the fixed version 2.12.1 produces just an empty white page when 2.11.0 is replaced by 2.12.1.

    The new way to generate the .phar file seems not yet to be compatible to version 2.11.0 and not yet tested sufficiently. So I unfortunately can only recommend to keep version 2.11.0.

    opened by dark-rider 10
  • GeoIp2\Database\Reader sometimes returns AddressNotFoundException

    GeoIp2\Database\Reader sometimes returns AddressNotFoundException

    Hi,

    I love your package and it has helped me a lot in my projects. I am facing an issue where GeoIp2\Database\Reader sometimes returns AddressNotFoundException on live environment other times it returns the correct IP information. I am using maxmind database for IP lookup.

    I have created a test function that dds the GeoIp2\Database\Reader instance: $reader = new Reader(storage_path() . '/app/geoip.mmdb'); $record = $reader->city($ip); dd([ 'ip' => $ip, 'iso_code' => $record->country->isoCode, 'country' => $record->country->name, 'city' => $record->city->name, ]); But I get AddressNotFoundException exception when testing with this IP=73.124.136.133 and sometimes it returns the correct results.

    opened by nag381 9
  • Error message: The application may only be invoked from a command line, got

    Error message: The application may only be invoked from a command line, got "fpm-fcgi"

    When I replace geoip2.phar version 2.11.0 by 2.12.0, the following error message appears instead of the desired PHP website: The application may only be invoked from a command line, got "fpm-fcgi"

    How to fix this?

    opened by dark-rider 7
  • GeoIP2.phar 2.9.0 don't work with Joomla > 3.9.2

    GeoIP2.phar 2.9.0 don't work with Joomla > 3.9.2

    https://github.com/joomla/joomla-cms/issues/24176 https://github.com/TYPO3/phar-stream-wrapper/issues/21 https://github.com/TYPO3/phar-stream-wrapper/pull/22

    opened by jurihahn 6
  • geoip2.phar 2.9.0 on PHP 7.1

    geoip2.phar 2.9.0 on PHP 7.1

    When testing geoip2.phar 2.9.0 on PHP 7.1 the script just exit... i'm unable to get any error log PHP :

    before
    <?php
    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);
    
    include(__DIR__ . '/MaxMind-GeoIP2/geoip2.phar');
    ?>
    after
    
    

    On PHP 7.2 it works normally...

    Any help? Thanks!

    opened by seltix5 6
  • Fatal error when IP not found

    Fatal error when IP not found

    Hi,

    I quickly found out while testing the GeoIP2-php code that it produces a fatal error when an IP is not found. I of course have built in some code to prevent feeding it any IP that should not be in the database:

    filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE | FILTER_FLAG_NO_PRIV_RANGE)

    Of course, there is no guarantee that one particular legitimate IP may not be found in the database. Maxmind says that "most" IPv6 addresses are included. This is not ALL and thus there is room for a fatal error.

    Regardless of what you feed this, in my opinion, it should never produce a fatal error. This stops all execution. I'd like to suggest that the code be updated so that only a warning is thrown and a NULL value is returned instead. GeoIP is usually only a small part of a much larger set of code. It shouldn't crash the train.

    opened by jcbenton 6
  • 2.13.0 switches to git over SSH for Packagist source

    2.13.0 switches to git over SSH for Packagist source

    For some reason (I don't see it in the codebase anywhere so I assume it's somewhere in the Packagist configuration?), 2.13.0 has changed the "source" parameter for this package to be an SSH git URL:

    2.12.2

                "name": "geoip2/geoip2",
                "version": "v2.12.2",
                "source": {
                    "type": "git",
                    "url": "https://github.com/maxmind/GeoIP2-php.git",
                    "reference": "83adb44ac4b9553d36b579a14673ed124583082f"
                },
    

    2.13.0

                "name": "geoip2/geoip2",
                "version": "v2.13.0",
                "source": {
                    "type": "git",
                    "url": "[email protected]:maxmind/GeoIP2-php.git",
                    "reference": "6a41d8fbd6b90052bc34dff3b4252d0f88067b23"
                },
    

    which breaks our build and deployment process, as our build servers don't have the ability to SSH out. Every other package has an https URL which works fine, and the dist URL for this package is still https, but it's just odd that the source URL has changed.

    Can you take a look and see if this is something that can be changed back to https (which should behave the exact same, but will fix source-based builds that can't SSH)? For now we've just forced 2.12.2 but would like to be able to track updates and build from source.

    Thanks guys!

    opened by jasongill 6
Releases(v2.13.0)
  • v2.13.0(Aug 5, 2022)

    • The model class names are no longer constructed by concatenating strings. This change was made to improve support for tools like PHP-Scoper. Reported by Andrew Mead. GitHub #194.
    • Box 4.0.1 is now used to generate the geoip2.phar file.
    Source code(tar.gz)
    Source code(zip)
    geoip2.phar(513.22 KB)
  • v2.12.2(Nov 30, 2021)

  • v2.12.1(Nov 23, 2021)

  • v2.12.0(Nov 18, 2021)

    • Support for mobile country code (MCC) and mobile network codes (MNC) was added for the GeoIP2 ISP and Enterprise databases as well as the GeoIP2 City and Insights web services. $mobileCountryCode and $mobileNetworkCode properties were added to GeoIp2\Model\Isp for the GeoIP2 ISP database and GeoIp2\Record\Traits for the Enterprise database and the GeoIP2 City and Insights web services. We expect this data to be available by late January, 2022.
    • geoip2.phar is now generated with Box 3.x.
    Source code(tar.gz)
    Source code(zip)
    geoip2.phar(496.03 KB)
  • v2.11.0(Oct 1, 2020)

  • v2.10.0(Dec 12, 2019)

    • PHP 5.6 or greater is now required.
    • The network property was added to GeoIp2\Record\Traits, GeoIp2\Model\AnonymousIp, GeoIp2\Model\Asn, GeoIp2\Model\ConnectionType, Geoip2\Model\Domain, and GeoIp2\Model\Isp. This is a string in CIDR format representing the largest network where all of the properties besides ipAddress have the same value.
    • Updated documentation of anonymizer properties - isAnonymousVpn and isHostingProvider - to be more descriptive.
    • The userCount property was added to GeoIp2\Record\Traits. This is an integer which indicates the estimated number of users sharing the IP/network during the past 24 hours. This output is available from GeoIP2 Precision Insights.
    • The staticIpScore property was added to GeoIp2\Record\Traits. This is a float which indicates how static or dynamic an IP address is. This output is available from GeoIP2 Precision Insights.
    Source code(tar.gz)
    Source code(zip)
    geoip2.phar(353.48 KB)
  • v2.9.0(Apr 10, 2018)

  • v2.8.0(Jan 18, 2018)

  • v2.7.0(Oct 27, 2017)

  • v2.6.0(Jul 10, 2017)

  • v2.5.0(May 8, 2017)

  • v2.4.5(Jan 31, 2017)

  • v2.4.4(Oct 11, 2016)

  • v2.4.3(Oct 11, 2016)

  • v2.4.2(Aug 17, 2016)

    • Updated documentation to clarify what the accuracy radius refers to.
    • Upgraded maxmind/web-service-common to 0.3.0. This version uses composer/ca-bundle rather than our own CA bundle. Fixes #75.
    • Improved PHP documentation generation.
    Source code(tar.gz)
    Source code(zip)
    geoip2.phar(377.51 KB)
  • v2.4.1(Jun 10, 2016)

  • v2.4.0(Apr 15, 2016)

  • v2.3.3(Sep 24, 2015)

  • v2.3.2(Sep 23, 2015)

    • JsonSerializable compatibility interface was moved to GeoIp2\Compat rather than the global namespace to prevent autoloading issues. Reported by Tomas Buteler. GitHub #54.
    • Missing documentation for the $postal property was added to the GeoIp2\Model\City class. Fix by Roy Sindre Norangshol. GitHub #51.
    • In the Phar distribution, source files for this module no longer have their documentation stripped, allowing IDE introspection to work properly. Reported by Dominic Black. GitHub #52.
    Source code(tar.gz)
    Source code(zip)
    geoip2.phar(358.66 KB)
  • v2.3.1(Jun 30, 2015)

  • v2.3.0(Jun 29, 2015)

    • Support for demographics fields averageIncome and populationDensity in the Location record, returned by the Insights endpoint.
    • The isAnonymousProxy and isSatelliteProvider properties on GeoIP2\Record\Traits have been deprecated. Please use our GeoIP2 Anonymous IP database to determine whether an IP address is used by an anonymizing service.
    • Incorporates replace Guzzle with internal curl API from 2.2.0-beta1
    Source code(tar.gz)
    Source code(zip)
    geoip2.phar(325.09 KB)
  • v2.1.1(Dec 3, 2014)

  • v2.1.0(Oct 29, 2014)

    • Update ApiGen dependency to version that isn't broken on case sensitive file systems.
    • Added support for the GeoIP2 Anonymous IP database. The GeoIP2\Database\Reader class now has an anonymousIp method which returns a GeoIP2\Model\AnonymousIp object.
    • Boolean attributes like those in the GeoIP2\Record\Traits class now return false instead of null when they were not true.
    Source code(tar.gz)
    Source code(zip)
    geoip2.phar(751.70 KB)
  • v2.0.0(Sep 22, 2014)

  • v0.9.0(Sep 15, 2014)

  • v0.8.1(Sep 12, 2014)

  • v0.8.0(Sep 10, 2014)

    • The GeoIP2\Database\Reader lookup methods (e.g., city(), isp()) now throw an BadMethodCallException if they are used with a database that does not match the method. In particular, doing a city() lookup on a GeoIP2 Country database will result in an exception, and vice versa.
    • A metadata() method has been added to the GeoIP2\Database\Reader class. This returns a MaxMind\Db\Reader\Metadata class with information about the database.
    • The name attribute was missing from the RepresentedCountry class.
    Source code(tar.gz)
    Source code(zip)
    geoip2.phar(737.68 KB)
  • v0.7.0(Jul 22, 2014)

    • The web service client API has been updated for the v2.1 release of the web service. In particular, the cityIspOrg and omni methods on GeoIP2\WebService\Client should be considered deprecated. The city method now provides all of the data formerly provided by cityIspOrg, and the omni method has been replaced by the insights method.
    • Support was added for GeoIP2 Connection Type, Domain and ISP databases.
    Source code(tar.gz)
    Source code(zip)
    geoip2.phar(718.48 KB)
  • v0.6.3(May 12, 2014)

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

Laravel Package for TMDB API Wrapper A Laravel package that provides easy access to the php-tmdb/api TMDB (The Movie Database) API wrapper. This packa

PHP - The Movie Database 151 Nov 1, 2022
Mollie API client wrapper for Laravel & Mollie Connect provider for Laravel Socialite

Mollie for Laravel Laravel-Mollie incorporates the Mollie API and Mollie Connect into your Laravel or Lumen project. Accepting iDEAL, Apple Pay, Banco

Mollie 289 Nov 24, 2022
PHP client library for reCAPTCHA, a free service to protect your website from spam and abuse.

reCAPTCHA PHP client library reCAPTCHA is a free CAPTCHA service that protects websites from spam and abuse. This is a PHP library that wraps up the s

Google 3.3k Dec 23, 2022
A simple pure PHP RADIUS client supporting Standard and Vendor-Specific Attributes in single file

BlockBox-Radius A simple pure PHP RADIUS client supporting Standard and Vendor-Specific Attributes in single file Author: Daren Yeh [email protected]

null 2 Oct 2, 2022
This is a laravel 4 package for the server and client side of datatables at http://datatables.net/

Datatable Important This package will not receive any new updates! You can still use this package, but be preparared that there is no active developme

Nils Plaschke 388 Dec 30, 2022
Generator-hedley - Scaffold a headless Drupal backend, Angular app client, and Behat tests

generator-hedley Scaffold a headless Drupal backend, Angular app client, and Behat tests Hedley is a yeoman generator that scaffolds a headless Drupal

null 99 Jun 3, 2022
Laravel Abdal Detector - Find info about IP , OS and web browser from your client

Laravel Abdal Detector - Find info about IP , OS and web browser from your client

 Abdal Security Group 1 Mar 24, 2022
Clean up and prevent empty meta from being saved for Job, Company, or Resume listings in database

=== Empty Meta Cleanup for WP Job Manager === Contributors: tripflex Tags: wp job manager, meta, cleanup, wpjobmanager Requires at least: 5.2 Tested u

Myles McNamara 3 Feb 7, 2022
LERN is a Laravel package that will record exceptions into a database and will notify you via Email, Pushover or Slack.

LERN is a Laravel package that will record exceptions into a database and will notify you via Email, Pushover or Slack.

Tyler Arbon 437 Nov 17, 2022
Declare database migrations and factory definitions inside Laravel models.

Lucid This package allows you to declare database migrations and factory definitions inside of your Laravel models. Running the lucid:migrate command

null 23 Jul 9, 2022
The query filter bundle allows you to filter data from QueryBuilder and the Database.

The query filter bundle allows you to filter data from QueryBuilder and the Database. you can filter multiple columns at the same time and also you can filter relation fields with two-level deep and without any join in your query builder.

Bugloos 15 Dec 29, 2022
Shared code for the MaxMind Web Service PHP client APIs

Common Code for MaxMind Web Service Clients This is not intended for direct use by third parties. Rather, it is for shared code between MaxMind's vari

MaxMind 264 Jan 3, 2023
Validate PHP database migration files for compliance with best practices. Ensure db migrations are irreversible.

PHP DB Migration Validator Introduction In modern PHP frameworks such as Symfony and Laravel, migrations usually have up and down methods. In up metho

Anton Komarev 17 Dec 14, 2022
Database Repository / PHP Repository / Laravel Repository

Database Repository / PHP Repository / Laravel Repository Installation Use following command to add this package to composer development requirement.

Bakery 6 Dec 21, 2022
A REST client inside your Laravel app

Laravel Compass is an elegant REST assistant for the Laravel framework that you can use to test API calls and create API documentation. it provides automatically endpoints for GET, POST, PUT/PATCH, DELETE, various auth mechanisms, and other utility endpoints based on Laravel routes in your project.

David H. Sianturi 1.2k Dec 31, 2022
Dashboard to view your http client requests in laravel application

Laravel Blanket is a package with wraps laravel http client requests and provide logs for request and response, also give option to retry any request from dashboard and more...

Ahmed waleed 215 Dec 29, 2022
Websockets-Client (Sample) laravel

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Filimantaptius Gulo 1 Mar 8, 2022
Minimal GraphQL client for Laravel.

Minimal GraphQL Laravel Client Minimal GraphQL client for Laravel. Requirements Composer 2+ Installation Install Package (Composer 2+) composer requir

David Gutierez Bendeck 20 Dec 7, 2022
Hashtopolis is a multi-platform client-server tool for distributing hashcat tasks to multiple computers.

Hashtopolis is a multi-platform client-server tool for distributing hashcat tasks to multiple computers. The main goals for Hashtopolis's development are portability, robustness, multi-user support, and multiple groups management.

Hashtopolis 1.1k Jan 4, 2023