PHP code example of luzrain / ipcalc

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

    

luzrain / ipcalc example snippets




$net = new IPCalc\IP('fe80:dead:15:a:bad:1dea:11:2234/93');
// or
$net = new IPCalc\IP('fe80:dead:15:a:bad:1dea:11:2234', 93);

echo new IPCalc\IP('192.168.1.10/24');