Re: How can I get IP of ppp0?
| From: | Curt Zirzow | Date: | Fri, 05 Sep 2003 13:19:32 +0000 |
| Subject: | Re: How can I get IP of ppp0? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161758@lists.php.net to get a copy of this message | ||
* Thus wrote Erick Okasaki (erickprogrammer@terra.com.br):
> 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 not so sure."