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-12-01 00:26:27 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