Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 16, 2024 via composer

geoip2/geoip2 v3.0.0

MaxMind GeoIP2 PHP API
Package summary
Share
0
issues
1
license
2
Apache-2.0
Package created
13 May 2013
Version published
4 Dec 2023
Maintainers
2
Total deps
2
Direct deps
1
License
Apache-2.0

Issues

0
This package has no issues

Licenses

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
2 Packages, Including:
geoip2/geoip2@v3.0.0
maxmind-db/reader@v1.11.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of geoip2/geoip2 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
maxmind-db/readerv1.11.130.38 kBApache-2.0
prod

Visualizations

Frequently Asked Questions

What does geoip2/geoip2 do?

The package geoip2/geoip2, developed by MaxMind, provides a PHP API that enables integration with the GeoIP2 and GeoLite2 web services and databases. This advanced geo-targeting technology allows developers to determine the geographical location of a specific IP address and much other related information.

How do you use geoip2/geoip2?

Utilizing geoip2/geoip2 in your project involves installing it via Composer, a standard package manager for PHP. To do so, navigate to the root directory of your project and run the command php composer.phar require geoip2/geoip2:~2.0. After running this command, the dependent files (composer.json and composer.lock) and vendor directory should be created in your project directory.

To employ this package, include the auto-loader provided by Composer in your PHP code using require 'vendor/autoload.php';. Now, you are ready to create a Reader or Client object and call the corresponding method for the web service or database you want to use.

For example, to find information about a specific IP address using the city database, you can use the following code:

require_once 'vendor/autoload.php';
use GeoIp2\Database\Reader;
$reader = new Reader('/path/to/GeoIP2-City.mmdb');
$record = $reader->city('128.101.101.101');

Multiple examples on how to utilize geoip2/geoip2 in different situations are provided in the README of the package.

Where are the geoip2/geoip2 docs?

The documentation for geoip2/geoip2 can be found at two locations provided in the README. The GeoIP2 and GeoLite2 web services documentation is available here and the databases documentation is accessible here. More detailed information is found on the API documentation in the PHP manual. The README also provides a comprehensive guide on using the package, including different installation methods, examples on how to use the package for different situations, database updates, data issues, and other support details.