RE: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Jay Blanchard
[snip] How can I get IP Address from my connection ppp0 or ppp1 in Linux? What 's the function? [/snip] shootin' from the hip because I am looking for something like this as well. I would also like to be able to activate PPP...need some serial port control. Here are my thoughts on your

RE: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Javier Tacon
function getRemoteIP() { if(getenv(HTTP_CLIENT_IP)) $ip = getenv(HTTP_CLIENT_IP); else if(getenv(HTTP_X_FORWARDED_FOR)) $ip = getenv(HTTP_X_FORWARDED_FOR); else return getenv(REMOTE_ADDR); return $ip; } -Mensaje original- De: Erick Okasaki [mailto:[EMAIL PROTECTED] Enviado el:

Re: [PHP] How can I get IP of ppp0?

2003-09-05 Thread MuToGeN
Hello Erick, ipconfig EO Hello List, EO How can I get IP Address from my connection ppp0 or ppp1 in Linux? What EO 's the function? EO thanks EO Erick -- Best regards, MuToGeNmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Raditha Dissanayake
Hardly what you call a php question. just type ifconfig -a Erick Okasaki wrote: Hello List, How can I get IP Address from my connection ppp0 or ppp1 in Linux? What 's the function? thanks Erick -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General

Re: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Maciek Ruckgaber Bielecki
I would use something like this $ifconfMess = shell_exec(ifconfig tun0); if(preg_match(/\d{2,3}(\.(\d){1,3}){3}/,$ifconfMess,$ip)) $tunip = $ip[0]; see ya ! On Fri, Sep 05, 2003 at 09:46:41AM -0300, Erick Okasaki wrote: Hello List, How can I get IP Address from my

Re: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Curt Zirzow
* Thus wrote Erick Okasaki ([EMAIL PROTECTED]): Hello List, How can I get IP Address from my connection ppp0 or ppp1 in Linux? What 's the function? This might work. $ip = `ifconfig ppp0 | grep netmask | cut -f 2 -d ' ' | tail -1`; Curt -- I used to think I was indecisive, but now I'm

[Fwd: Re: [PHP] How can I get IP of ppp0?]

2003-09-05 Thread Erick Okasaki
Sorry if I was not clear enough but it's a php question because I want get IP Address from connection ppp0 (in Linux) with some function in PHP! thanks Erick Original Message Hardly what you call a php question. just type ifconfig -a Erick Okasaki wrote: Hello List, How

Re: [Fwd: Re: [PHP] How can I get IP of ppp0?]

2003-09-05 Thread Raditha Dissanayake
And i am sorry for being trigger happy. Erick Okasaki wrote: Sorry if I was not clear enough but it's a php question because I want get IP Address from connection ppp0 (in Linux) with some function in PHP! thanks Erick Original Message Hardly what you call a php question.

RE: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Dan Anderson
[snip] How can I get IP Address from my connection ppp0 or ppp1 in Linux? What 's the function? [/snip] Well, you can (if I'm not mistaken) create PHP modules using C++. You could also create shell scripts you could exec(). PHP isn't really meant to be a server control though. So anything