Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lefuturiste/iptator

The best way to get details about an IP address, no php ext required. Get ip details from multiple api source.
https://github.com/lefuturiste/iptator

Last synced: 4 days ago
JSON representation

The best way to get details about an IP address, no php ext required. Get ip details from multiple api source.

Awesome Lists containing this project

README

        

# Iptator

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

```php
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`