This repository contains the sourcecode of geoip.nekudo.com. You can use it to setup your own geolocation API.
The API utilizes the Maxmind GeoLite2 Database.
- Webserver supporting URL rewrites (Apache, Nginx, lighttpd, ...)
- PHP >= 7.0
- MaxMind DbReader PHP-Extension (optional for better performance)
To setup you own API follow these steps:
- Download the latest release of this repository to your server.
- Download a copy of the GeoLite2 Database to the
- Adjust the config file in
- Point your webserver to the
- Rewrite all requests to the index.php file (Using htaccess, nginx configuration, e.g.).
ShinyGeoip includes a CLI application which can be used to update the mmdb-file. To use this updater run the following command from the project root folder:
php cli/app.php mmdb_update
You can also run a simple benchmark with the following command:
php cli/app.php benchmark
Frequently Asked Questions
I am getting an wrong/empty result for my IP - can you update the database?
This project uses the GeoLite2 Database provided by Maxmind. If there is any error in this database you can submit corrections directly to Maxmind. This project however has no influence on the information in this database.