vipsoft/network-interfaces

net_get_interfaces class wrapper

1.0.0 2023-12-01 14:58 UTC

This package is auto-updated.

Last update: 2024-10-31 00:41:39 UTC


README

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