Download the PHP package midnite81/geolocation without Composer

On this page you can find all versions of the php package midnite81/geolocation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package 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:

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.

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


All versions of geolocation with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
guzzlehttp/guzzle Version ^7.0
ext-json Version *
midnite81/core Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package midnite81/geolocation contains the following files

Loading the files please wait ....