arimolzer/ipstack

Laravel package for geolocation using the IPStack API

dev-main 2025-02-15 00:55 UTC

This package is auto-updated.

Last update: 2025-02-15 00:55:51 UTC


README

Build Status StyleCI Packagist

This package has been created as a simple facade to access the IPStack API.

Take a look at contributing.md to see a to do list.

Installation

Getting started with IPStack is easy, first install the package via Composer:

composer require arimolzer/ipstack

Then, optionally, publish the package configuration.

php artisan vendor:publish --provider="Arimolzer\IPStack\IPStackServiceProvider"

Then, you can set your environmental variables:

Usage

Single IP Lookup

To lookup the geolocation of a single IP address:

use \Arimolzer\IPStack\Facades\IPStack;

IPStack::get('134.201.250.155')

Bulk IP Address lookup

IP Stack supports bulk IP lookups, with a maximum of 50 addresses. Simply pass through an array of IP addresses to the getBulk method.

Important

The 'Professional' subscription tier is required to access the bulk endpoint.

IPStack::getBulk(['134.201.250.155' ,'72.229.28.185', '110.174.165.78'])

Change log

Please see the changelog for more information on what has changed recently.

Testing

composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email ari.molzer@molzertech.com instead of using the issue tracker.

Credits

License

MIT. Please see the license file for more information.