Re: Socket functions

From: 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 &lt;phplist@meidomus.com&gt;</i><br>To: <i>Philippe Reynolds &lt;phil_ren@hotmail.com&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>

« previous php.general (#221587) next »