Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Latest commit

 

History

History
executable file
·
46 lines (33 loc) · 765 Bytes

README.md

File metadata and controls

executable file
·
46 lines (33 loc) · 765 Bytes

IPInfo - Easy PHP Library for ipinfo.io

Instalation

{
	"require" : {
		"wallacemaxters/ipinfo" : "1.*"
	}
}
use WallaceMaxters\IPInfo\IPInfo;

Get the response of ipinfo.io. This returns the \WallaceMaxters\IPInfo\Response object;

$responseObject = IPInfo::get('8.8.8.8');

Get a collection of a response of \WallaceMaxters\IPInfo\Response

$ipCollection = IPInfo::get(['8.8.8.8', '7.7.7.7']);

Get Lat and Lng separated in array. This results are converted in float

list($lat, $lng) = IPInfo::get('8.8.8.8')->getLoc();

Converting information to array

IPInfo::get('8.8.8.8')->toArray();

Retrieves information from host(s)

$data = IPInfo::getFromHost('www.google.com');