lefuturiste / iptator
The best way to get details about an IP address, no ext required
v1.1
2018-12-02 10:22 UTC
Requires
- ext-json: *
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: ^7.4
This package is auto-updated.
Last update: 2024-10-29 05:46:39 UTC
README
The best way to get details about an IP address, no php ext required. Get ip details from multiple api source.
Install
composer install lefuturiste/iptator
Requirement
This package use the guzzle http php library to make http request, so curl ext is required.
Usage
use Iptator\Scanner; $scanner = new Scanner(); $ip = $scanner->scan('1.1.1.1'); $ip->isp; // Cloudflare, Inc. $ip->countryName; // Australia $ip->city; // South Brisbane
Adapters
- ipapi.co
- ip-api.com
Test
vendor/bin/phpunit tests