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: > >> >>exec('ipconfig',$catch); > >>foreach($catch as $line){ > >>if(eregi('IP Address',$line)){ > >>list($t,$ip) = split(':',$line); > >>echo

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 Mark
For Win9x, use winipcfg instead of ipconfig. --- Chris Lee <[EMAIL PROTECTED]> wrote: > >Try this: > > >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-27 Thread Chris Lee
>Try this: >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: [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