Bug #17400 Updated: getting ip for eth0

From: Date: Fri, 24 May 2002 04:37:56 +0000
Subject: Bug #17400 Updated: getting ip for eth0
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-8371@lists.php.net to get a copy of this message
 ID:          17400
 Updated by:  mfischer@php.net
 Reported By: e@arix.com
 Status:      Open
 Bug Type:    *Network Functions
 PHP Version: 4.2.1
 New Comment:

If you can think of a cross-platform way ... which I doubt.

Just execute /sbin/ifconfig and parse it's output.


Previous Comments:
------------------------------------------------------------------------

[2002-05-23 20:29:51] e@arix.com

I'd like to request a function to retrieve the IP address(es) of a
given network interface... something that would let me:

  $ip = ifaddr("eth0");

maybe even something more general like:

  $info = ifconfig("eth0")

echo $info["HWAddr"], $info["Mask"];
echo $info["RX-packets"], $info["RX-errors"],

etc.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=17400&edit=1



Thread (12 messages)

« previous php.bugs (#8371) next »