PHP code example of vipsoft / network-interfaces

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

    

vipsoft / network-interfaces example snippets


    use VIPSoft\NetworkInterfaces;

    $netif = new NetworkInterfaces;

    // gets the host name
    $host = $netif->getHostAddr();

    // get network interfaces
    $interfaces = $netif->getNetworkInterfaces();