wallacemaxters / ipinfo
PHP Library of ipinfo.io
Installs: 54
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/wallacemaxters/ipinfo
Requires
- php: >=5.4.0
- ext-curl: *
This package is auto-updated.
Last update: 2023-06-09 23:31:33 UTC
README
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');