All Projects → midnite81 → geolocation

midnite81 / geolocation

Licence: MIT license
A laravel integration for using the IPInfoDB and Ip2Location services

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to geolocation

ipinfodb-php
PHP library to query free IPInfoDB API service.
Stars: ✭ 15 (-60.53%)
Mutual labels:  geolocation, geolocation-api, ip2location, ipinfodb
IP2Country
Ip to country mapping
Stars: ✭ 39 (+2.63%)
Mutual labels:  geolocation, ip2location
IP2Location-PHP-Module
This module is a PHP module that enables the user to find the country, region, city, coordinates, zip code, ISP, domain name, timezone, connection speed, IDD code, area code, weather station code, weather station name, mobile, usage types, address type, IAB category, etc that any IP address or host name originates from.
Stars: ✭ 154 (+305.26%)
Mutual labels:  geolocation, ip2location
ip2location-nginx
This is IP2Location Nginx module that enables the user to find the country, region (state), city, latitude, longitude, zip code, time zone, ISP, domain name, connection type, area code, weather, mobile network, elevation, usage type, address type and IAB category by IP address or hostname originates from.
Stars: ✭ 38 (+0%)
Mutual labels:  geolocation, ip2location
ip2location-iata-icao
This list contains the airport codes of IATA airport code and ICAO airport code together with country code and region name supported in IP2Location geolocation database.
Stars: ✭ 39 (+2.63%)
Mutual labels:  geolocation, ip2location
ipapi-python
Python bindings for https://ipapi.co (IP Address Location) - Use with python / django / flask for IP address location lookup
Stars: ✭ 42 (+10.53%)
Mutual labels:  geolocation, geolocation-api
ionic2-firebase-hackathon-starter
A hackathon starter for ionic2 using firebase, already has user authentication, reset password, google login etc
Stars: ✭ 34 (-10.53%)
Mutual labels:  geolocation, geolocation-api
react-hook-geolocation
A React hook to access data from the Geolocation API
Stars: ✭ 31 (-18.42%)
Mutual labels:  geolocation, geolocation-api
go
Official Golang client library for the ipdata API
Stars: ✭ 21 (-44.74%)
Mutual labels:  geolocation, geolocation-api
ip2location-piwik
Use IP2Location geolocation database to lookup for accurate visitor location in Matomo (Piwik) 3.x. It enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category that any IP address o…
Stars: ✭ 26 (-31.58%)
Mutual labels:  geolocation, ip2location
IP2Location-C-Library
IP2Location C library enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather station code, weather station name, mobile, usage types, etc that any IP address or hostname originates from.
Stars: ✭ 37 (-2.63%)
Mutual labels:  geolocation, ip2location
ip2location-lua
Use IP2Location geolocation database to lookup the geolocation information with IP2Location Lua Package. It can be used to determine country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, address type and IAB category that any IP address …
Stars: ✭ 14 (-63.16%)
Mutual labels:  geolocation, ip2location
ip2location-nginx
Nginx module that allows user to lookup for geolocation information using IP2Location database.
Stars: ✭ 33 (-13.16%)
Mutual labels:  geolocation, ip2location
ip2location-cakephp
IP2Location CakePHP plugin enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather, MCC, MNC, mobile brand name, elevation, usage type, IP address type and IAB advertising category from IP address using IP2Location database.
Stars: ✭ 17 (-55.26%)
Mutual labels:  geolocation, ip2location
Laravel Geo Routes
GeoLocation restricted routes for Laravel
Stars: ✭ 110 (+189.47%)
Mutual labels:  geolocation, laravel-package
LaravelPostcodes
A service wrapper around postcodes.io
Stars: ✭ 73 (+92.11%)
Mutual labels:  geolocation, laravel-package
ip2location-csv-converter
This PHP script converts IP2Location CSV database into IP range or CIDR format.
Stars: ✭ 26 (-31.58%)
Mutual labels:  geolocation, ip2location
bread-templates
BREAD Templates with Voyager
Stars: ✭ 19 (-50%)
Mutual labels:  laravel-package
gitup
Laravel package to upload git commits to server(s) via (s)ftp.
Stars: ✭ 20 (-47.37%)
Mutual labels:  laravel-package
world-cities-mongodb
A free world cities database
Stars: ✭ 29 (-23.68%)
Mutual labels:  geolocation

Geolocation Latest Stable Version Total Downloads Latest Unstable Version License Build Coverage Status

A IP Info DB integration for Laravel

Versioning

Version Branch PHP Laravel Notes
^4.0 master/v4 >=8.1 >=8 Update to include wrap Ip2Location in addition to IpInfoDb, moved to php 8.1
^3.0 v3 >=7.4 >=6 Facade has been removed and guzzle dependency has been updated to version 7
^2.0 v2 >=5.6 >=5 Corrects issues with composer 2.0
^1.0 v1 >=5.6 >=5 First release - not compatible with composer 2.0

Upgrading to v4.0

Please note:

  • version 4 brings in the ability to wrap both the IpInfoDb service (as was available in previous versions) and the Ip2Location service. IpInfoDb are not accepting new registrations and are asking users to register at Ip2Location instead.
  • version 4 minimum requirements are php 8.1 to make use of the additional features php 8.1 brings, such as enums and better type safety.
  • version 4 has an updated config file. If you are upgrading, I would suggest checking out the config file and updating your local instance of it.
  • a change has been made to the caching from minutes to seconds.

Installation

If installing on anything below PHP 8.1, please checkout the v2 or v3 branch and follow the instructions on the readme for that branch. Please note ip2location is not supported on previous versions of this package

This package requires PHP 8.1+, and includes a Laravel Service Provider.

To install through composer include the package in your composer.json.

"midnite81/geolocation": "^4.0"

Run composer install or composer update to download the dependencies, or you can run composer require midnite81/geolocation.

Laravel Integration

This package makes use of Laravel's auto package loader, so you shouldn't need to add this to your config/app.php file. However, if you've disabled this then you'll need to add the GeoLocation service provider to the list of service providers in app/config/app.php.

'providers' => [
  Midnite81\GeoLocation\GeoLocationServiceProvider::class
];

Publish the config and migration files using php artisan vendor:publish --provider="Midnite81\GeoLocation\GeoLocationServiceProvider"

Configuration File

Once you have published the config files, you will find a geolocation.php file in the config folder. You should look through these settings and update these where necessary.

Env

You will need to add the following to your .env file and update these with your own settings. Please note you will only need to fill in the api key for the service you are using.

GEOLOCATION_IPINFODB_API_KEY=<ip_info_db_api_key>
GEOLOCATION_IP2LOCATION_API_KEY=<ip2location_api_key>
GEOLOCATION_CACHE=<duration_in_seconds>

Get your GeoLocation API Key

Before using this package you'll need to obtain an API Key from either IpInfoDb which is no longer accepting new registrations or Ip2Location.

Once you have signed up you will need to add your api key to the relevant .env key; GEOLOCATION_IPINFODB_API_KEY for IpInfoDb or GEOLOCATION_IP2LOCATION_API_KEY for Ip2Location.

Caching

This package allows you to cache responses, however it is your responsibility to ensure you're not breaking any terms and conditions of use.

Rate Limiting

This package does not set any rate limiting internally. You should ensure that your application adheres to any rate limiting set by your chosen provider.

Example Usage and Available Methods and Properties

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].