Re[2]: [PHP] Get Local IP Address

From: Date: Mon, 28 Jul 2003 06:53:39 +0000
Subject: Re[2]: [PHP] Get Local IP Address
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-157135@lists.php.net to get a copy of this message
Hi, Monday, July 28, 2003, 4:29:46 PM, you wrote: >>Try this: >><?php >>exec('ipconfig',$catch); >>foreach($catch as $line){ >> if(eregi('IP Address',$line)){ >> list($t,$ip) = split(':',$line); >> echo 'IP is '.$ip."\n"; >> } >>} >>?> CL> Thanks Tom, but I think it only work for Win NT, how about Win 9x? There is ipconfig.exe in win98 SE thats about all I know. -- regards, Tom

« previous php.general (#157135) next »