https://github.com/ip2location/ipinfodb-php
PHP library to query free IPInfoDB API service.
https://github.com/ip2location/ipinfodb-php
geolocation geolocation-api geolocation-database ip-address-api ip-address-lookup ip2location ipinfodb ipinfodb-php
Last synced: 9 months ago
JSON representation
PHP library to query free IPInfoDB API service.
- Host: GitHub
- URL: https://github.com/ip2location/ipinfodb-php
- Owner: ip2location
- License: mit
- Created: 2018-05-16T23:22:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-03T06:38:58.000Z (about 2 years ago)
- Last Synced: 2025-04-18T21:16:50.581Z (9 months ago)
- Topics: geolocation, geolocation-api, geolocation-database, ip-address-api, ip-address-lookup, ip2location, ipinfodb, ipinfodb-php
- Language: PHP
- Homepage: https://ipinfodb.com/api
- Size: 6.84 KB
- Stars: 16
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.TXT
Awesome Lists containing this project
README
[](https://packagist.org/packages/ip2location/ipinfodb-php)
[](https://packagist.org/packages/ip2location/ipinfodb-php)
IPInfoDB PHP
==============
This IPInfoDB PHP class provides a fast lookup of country, region, city, latitude, longitude, ZIP code and time zone as values. The IPInfoDB web service is designed for server-to-server call.
This library can be used in many types of projects such as:
- Locate where is your website visitors come from
- Analyze your web server logs to determine the countries of your visitors
- Country blocker
- Page redirection according to country
- Geotargeting in advertisement
IPInfoDB free API uses the geolocation data from [IP2Location LITE database](https://lite.ip2location.com). IP2Location Commercial version provides higher accuracy is available at https://www.ip2location.com/web-service with no rate limit.
## Methods
Below are the methods supported in this class.
|Method Name|Description|
|---|---|
|getCountry|Return country code and country name information of the IP address.|
|getCity|Return city information of the IP address, such as region, city, latitude, longitude, ZIP Code and time zone.|
## FAQ
#### How to I get the API key?
Please register your API key at https://ipinfodb.com/register.
#### Is there any restriction for using this web service?
There is a rate limit of 2 queries per second.
Copyright
=========
Copyright (C) 2021 - 2024 by IPInfoDB.com, support@ipinfodb.com