PHP code example of ipsquads / php

1. Go to this page and download the library: Download ipsquads/php 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/ */

    

ipsquads / php example snippets

bash
composer 
 php
use Ipsquads\Php\IPSquads;
$access_key = 'FREE';
$ip_squads = new IPSquads($access_key);
$ip_data = $ip_squads->getDetails('54.70.143.245');
 php
use Ipsquads\Php\IPSquads;
$access_key = 'FREE';
$ip_squads = new IPSquads($access_key);
$ip_data = $ip_squads->getCurrencyDetails('54.70.143.245');
 php
use Ipsquads\Php\IPSquads;
$access_key = 'FREE';
$ip_squads = new IPSquads($access_key);
$ip_data = $ip_squads->getTimezoneDetails('54.70.143.245');
 php
use Ipsquads\Php\IPSquads;
$access_key = 'FREE';
$ip_squads = new IPSquads($access_key);
$ip_data = $ip_squads->getNetworkDetails('54.70.143.245');
 php
use Ipsquads\Php\IPSquads;
$access_key = 'FREE';
$settings = [
  'expires_after' => '1000'
];
$ip_squads = new IPSquads($access_key, $settings);
 php
use Ipsquads\Php\IPSquads;
use Symfony\Component\Cache\Adapter\ApcuAdapter;
$access_key = 'FREE';
$settings = [
  'cache_adapter' => (new ApcuAdapter)
];
$ip_squads = new IPSquads($access_key, $settings);