Re: Socket functions
| From: | Philippe Reynolds | Date: | Tue, 30 Aug 2005 12:49:40 +0000 |
| Subject: | Re: Socket functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221587@lists.php.net to get a copy of this message | ||
WOW...so much simpler..thank you very much!!
Cheers
Phil
<BLOCKQUOTE style='PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #A0C6E5 2px solid; MARGIN-RIGHT: 0px'><font style='FONT-SIZE:11px;FONT-FAMILY:tahoma,sans-serif'><hr color=#A0C6E5 size=1>
From: <i>Burhan Khalid <phplist@meidomus.com></i><br>To: <i>Philippe Reynolds <phil_ren@hotmail.com></i><br>CC: <i>php-general@lists.php.net</i><br>Subject: <i>Re: [PHP] Socket functions</i><br>Date: <i>Tue, 30 Aug 2005 09:49:22 +0300</i><br>>Philippe Reynolds wrote:<br>>>Greetings,<br>>><br>>>When I do an ifconfig in unix, I see the the IP address for the my <br>>>ethernet. It follows something called inet.<br>>><br>>>Would anyone know who to manipulate the socket functions to be able <br>>>to extract the inet IP address fromt the eth0 section??<br>><br>><?php<br>><br>> exec('ifconfig eth0 | grep inet',$output);<br>>preg_match("|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|",$output[0],$matches);<br>> echo $matches[0];<br>><br>>?><br></font></BLOCKQUOTE>