Skip to content

vipsoft/network-interfaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VIPSoft\NetworkInterfaces

A class wrapper to get network interfaces. Provides a shim (using ifconfig) for net_get_interfaces (added in PHP 7.3).

Features

  • Simple to use!

    use VIPSoft\NetworkInterfaces;
    
    $netif = new NetworkInterfaces;
    
    // gets the host name
    $host = $netif->getHostAddr();
    
    // get network interfaces
    $interfaces = $netif->getNetworkInterfaces();

Copyright

Copyright (c) 2023 Anthon Pang. See LICENSE for details.

Contributors