wallacemaxters / ipinfo
This package is abandoned and no longer maintained.
No replacement package was suggested.
PHP Library of ipinfo.io
1.3.0
2015-12-05 12:20 UTC
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');