PHP code example of wallacemaxters / ipinfo

1. Go to this page and download the library: Download wallacemaxters/ipinfo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wallacemaxters / ipinfo example snippets


use WallaceMaxters\IPInfo\IPInfo;

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

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

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


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

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