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 &lt;[EMAIL PROTECTED]&gt;</i><br>To: <i>Philippe Reynolds &lt;[EMAIL PROTECTED]&gt;</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>&gt;Philippe Reynolds wrote:<br>&gt;&gt;Greetings,<br>&gt;&gt;<br>&gt;&gt;When I do an ifconfig in unix, I see the the IP address for the my <br>&gt;&gt;ethernet. It follows something called inet.<br>&gt;&gt;<br>&gt;&gt;Would anyone know who to manipulate the socket functions to be able <br>&gt;&gt;to extract the inet IP address fromt the eth0 section??<br>&gt;<br>&gt;&lt;?php<br>&gt;<br>&gt; exec('ifconfig eth0 | grep inet',$output);<br>&gt;preg_match(&quot;|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|&quot;,$output[0],$matches);<br>&gt; echo $matches[0];<br>&gt;<br>&gt;?&gt;<br></font></BLOCKQUOTE>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to