Download the PHP package ip2location/ip2location-laravel without Composer

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

IP2Location Laravel Extension

Latest Stable Version Total Downloads

IP2Location Laravel extension enables the user to find the country, region, district, 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, IAB advertising category and ASN from IP address using IP2Location database. It has been optimized for speed and memory utilization.

Note: This extension works in Laravel 6, Laravel 7, Laravel 8, Laravel 9, Laravel 10 and Laravel 11.

INSTALLATION

Run the command: composer require ip2location/ip2location-laravel to download the package into the Laravel platform.

USAGE

IP2Location Laravel extension is able to query the IP address information from either BIN database or web service. This section will explain how to use this extension to query from BIN database and web service.

BIN DATABASE

  1. Download IP2Location BIN database
  2. To use IP2Location databases, create a folder named as ip2location in the database directory.
  3. Unzip and copy the BIN file into database/ip2location/ folder.
  4. Rename the BIN file to IP2LOCATION.BIN.
  5. Create a TestController in Laravel using the below command line

  6. Open the app/Http/Controllers/TestController.php in any text editor.
  7. To use IP2Location databases, add the below lines into the controller file.

  8. Add the following line into the routes/web.php file.

  9. Enter the URL /test and run. You should see the information of 8.8.8.8 IP address.

WEB SERVICE

  1. To use IP2Location.io or IP2Location web service, create a new file called "site_vars.php" in config directory.
  2. In the site_vars.php, save the following contents for IP2Location.io:

Or save the following contents for IP2Location:

  1. Create a TestController in Laravel using the below command line

  2. Open the app/Http/Controllers/TestController.php in any text editor.
  3. To use IP2Location databases, add the below lines into the controller file.

  4. Add the following line into the routes/web.php file.

  5. Enter the URL /test and run. You should see the information of 8.8.8.8 IP address.

IPTOOLS

  1. Create a TestController in Laravel using the below command line

  2. Open the app/Http/Controllers/TestController.php in any text editor.
  3. To use IP2Location IPTools class, add the below lines into the controller file.

  4. Add the following line into the routes/web.php file.

  5. Enter the URL /test and run.

DEPENDENCIES

This library requires either IP2Location BIN data file or IP2Location API key to function. You may download the BIN data file at

For IP2Location API key, you can sign up IP2Location Web Service to get one free API key.

IPv4 BIN vs IPv6 BIN

Use the IPv4 BIN file if you just need to query IPv4 addresses. Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.

SUPPORT

Email: [email protected]

Website: https://www.ip2location.com


All versions of ip2location-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
ip2location/ip2location-php Version >=9.4
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 ip2location/ip2location-laravel contains the following files

Loading the files please wait ....