note 55007 added to function.preg-split

From: Date: Fri, 22 Jul 2005 09:59:57 +0000
Subject: note 55007 added to function.preg-split
Groups: php.notes 
Request: Send a blank email to php-notes+get-92278@lists.php.net to get a copy of this message
I have been searching for a method to get the IP details from a unix based (solaris) interface and found this to be useful. $devicen = "iprb1"; $temp = preg_split("/[\s]+/",shell_exec("/sbin/ifconfig $devicen | /bin/grep \"inet\""), -1, PREG_SPLIT_NO_EMPTY); $ipaddress = $temp[1]; $netmask = $temp[3]; $gateway = $temp[5]; print_r ($temp); print "<BR>This is the current IP Address: $ipaddress<BR> this is the current netmask: $netmask<BR> this is the current default gateway $gateway<BR>"; ---- Manual Page -- http://www.php.net/manual/en/function.preg-split.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55007 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55007&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55007&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55007&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55007&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55007&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55007&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55007&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92278) next »