PHP code example of matriphe / larinfo

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

    

matriphe / larinfo example snippets


'ipinfo' => [
    'token'  => 'your_ipinfo_token',
]

use Larinfo;

$larinfo = Larinfo::getInfo();

$larinfo = [
   'host'=> [
       'city'=> 'San Francisco',
       'country'=> 'US',
       'hostname'=> '',
       'ip'=> '104.20.8.94',
       'loc'=> '37.7697,-122.3933',
       'org'=> 'AS13335 Cloudflare, Inc.',
       'phone'=> '',
       'postal'=> '94107',
       'region'=> 'California',
       'timezone' => 'America/Los_Angeles',
   ],
   'client'=> [
       'city'=> 'Bekasi',
       'country'=> 'ID',
       'hostname'=> '',
       'ip'=> '180.252.202.108',
       'loc'=> '-6.2349,106.9896',
       'org'=> 'AS17974 PT Telekomunikasi Indonesia',
       'phone'=> '',
       'postal'=> '',
       'region'=> ''
   ],
   'server'=> [
       'software'=> [
           'os'=> 'MacOS',
           'distro'=> 'MacOS 10.15.7',
           'kernel'=> '19.6.0',
           'arc'=> 'x86_64',
           'webserver'=> 'nginx/1.19.8',
           'php'=> '8.0.3'
       ],
       'hardware'=> [
           'cpu'=> 'Intel® Core™ i5-3210M CPU @ 2.50GHz',
           'cpu_count'=> 4,
           'model'=> 'Apple device',
           'virtualization'=> '',
           'ram'=> [
               'total'=> 8589934592,
               'free'=> 8578883584,
               'human_total' => '8.0 GiB',
               'human_free' => '15.0 MiB',
           ],
           'swap'=> [
               'total'=> 2147483648,
               'free'=> 426246144,
               'human_total' => '2.0 GiB',
               'human_free' => '406.5 MiB',
           ],
           'disk'=> [
               'total'=> 2999590176768,
               'free'=> 1879852326912,
               'human_total' => '2.7 TiB',
               'human_free' => '1.7 TiB',
           ]
       ],
       'uptime'=> [
           'uptime'=> '2 days, 12 hours, 13 minutes, 43 seconds',
           'booted_at'=> '2021-04-02 15:27:54'
       ]
   ],
   'database'=> [
       'driver'=> 'MySQL',
       'version'=> '8.0.22'
   ]
];
ini
extension=com_dotnet
shell
php artisan vendor:publish
shell
php artisan larinfo