PHP code example of parvion / ip-intelligence

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

    

parvion / ip-intelligence example snippets


use Parvion\IpIntelligence\IpInfo;

$info = new IpInfo();
$profile = $info->all();

use Parvion\IpIntelligence\Facades\IpIntelligence;

$profile = IpIntelligence::all();

$profile = ip_info()->all();

IpIntelligence::ip();             // Returns current Request IP (e.g., '192.168.1.1')
IpIntelligence::country();        // 'United States'
IpIntelligence::city();           // 'New York'
IpIntelligence::timezone();       // 'America/New_York'
IpIntelligence::currency();       // 'USD'

IpIntelligence::lookup('8.8.8.8')->city(); 

IpIntelligence::deviceType();     // 'Desktop', 'Phone', 'Tablet'
IpIntelligence::deviceBrand();    // 'Apple', 'Samsung', 'Xiaomi', etc.
IpIntelligence::platform();       // 'Windows', 'macOS', 'iOS', 'Android'
IpIntelligence::browser();        // 'Chrome', 'Firefox', 'Safari'
IpIntelligence::browserEngine();  // 'Blink', 'WebKit', 'Gecko'

IpIntelligence::isBot();          // bool
IpIntelligence::botName();        // 'Googlebot', 'Bingbot', null
IpIntelligence::isVpn();          // bool
IpIntelligence::isProxy();        // bool
IpIntelligence::isTor();          // bool
IpIntelligence::network();        // Returns ISP and ASN information array
bash
php artisan vendor:publish --provider="Parvion\IpIntelligence\IpIntelligenceServiceProvider"