Download the PHP package roomies/geolocatable without Composer

On this page you can find all versions of the php package roomies/geolocatable. 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 geolocatable

Roomies Geolocatable

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Determine the geographical location, currency and network information of website users based on their IP addresses.

Geolocatable is an abstraction over multiple IP geolocation services including Cloudflare, Ip2Location, ipapi.co ipapi.com, ip-api.com, ipdata, Maxmind GeoIP database and web services.

It's based off of laravel-geoip, but there are some key differences that may affect your decision:

Installation

You can install the package via Composer:

You can publish the config file with:

Read through the config file to understand the supported services and provide the correct configuration for your preferred services.

Getting started

You can perform an IP address geolcaton using the Facade.

Depending on the provider you choose different combinations of information will be available. It will also depend specifically on the IP address itself and what data the provider has. However, Geolocatable returns a typed readonly class that provides access to structured attributes as well as the raw result if you require it.

You can also change the provider you use on the fly.

Cloudflare

If you have Cloudflare in front of your website you can add visitor location headers to your app using a managed transform. It doesn't have as much information as other providers and it can only be used for the IP address that makes the request, but it is a great free option if you don't need greater detail.

Ip2Location

Ip2Location is a freemium service that starts at 30,000 lookups/month for free.

Check the config file or provide your IP2LOCATION_KEY in the environment.

ipapi.co

ipapi is a freemium service.

ipapi.com

Proivide your IPAPI_KEY API key to use this API.

ip-api.com

ip-api is a freemium service.

ipdata

Provide your IPDATA_KEY API key to use this API.

Maxmind Database

Provide your Maxmind account_id and license_key to download the Maxmind database.

Once configured you need to install the geoip2 dependency and then download the database.

You can choose to update the database on your own schedule.

Maxmind Web Services

Provide your Maxmind account_id and license_key to use Maxmind Web Services.

By default it will use the city level for IP address details but you can control this.

Testing

Geolocatable includes a fake which makes it easy for you to test how your app handles different results. It allows you to stub the res

License

The MIT License (MIT). Please see License File for more information.


All versions of geolocatable with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/console Version ^11.0
illuminate/contracts Version ^11.0
illuminate/http Version ^11.0
illuminate/support Version ^11.0
spatie/temporary-directory Version ^2.2.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 roomies/geolocatable contains the following files

Loading the files please wait ....