Bug #17400 Updated: getting ip for eth0

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

reclassify as feature request


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

[2002-05-24 00:37:55] mfischer@php.net

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

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

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

[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 (#8374) next »