Re: [PHP] Get Local IP Address

2003-07-28 Thread Chris Lee
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; } } ? Thanks Tom, but I think it only work for Win NT, how about Win 9x? -- PHP General

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

2003-07-28 Thread Tom Rogers
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

Re: [PHP] Get Local IP Address

2003-07-28 Thread Mark
For Win9x, use winipcfg instead of ipconfig. --- Chris Lee [EMAIL PROTECTED] 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; } }

Re: [PHP] Get Local IP Address

2003-07-28 Thread Comex
[EMAIL PROTECTED] Mark: For Win9x, use winipcfg instead of ipconfig. winipcfg is a windows-based utility, which can't work with PHP. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Get Local IP Address

2003-07-28 Thread Curt Zirzow
* Thus wrote Tom Rogers ([EMAIL PROTECTED]): 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;

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

2003-07-28 Thread Tom Rogers
Hi, Tuesday, July 29, 2003, 3:11:43 AM, you wrote: CZ * Thus wrote Tom Rogers ([EMAIL PROTECTED]): 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) =

[PHP] Get Local IP Address

2003-07-27 Thread Chris Lee
How can I get the local Computer IP Address when running PHP program in Windows command line (i.e. php getmyip.php) ** Since the PHP did not are run on Webserver, so _SERVER[SERVER_ADDR] won't work. Many thanks in advance. Regards, Chris -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Get Local IP Address

2003-07-27 Thread Tom Rogers
Hi, Monday, July 28, 2003, 12:21:06 PM, you wrote: CL How can I get the local Computer IP Address when running PHP program in CL Windows command line (i.e. php getmyip.php) CL ** Since the PHP did not are run on Webserver, so _SERVER[SERVER_ADDR] CL won't work. CL Many thanks in advance. CL