|
Posted by _andrea.l on 12/23/05 00:50
I'm writing a little script for reading information from a router by telnet.
I have a problem
How give a comand and get the answer more times?
I means:
[...]
$usenet = fsockopen($cfgServer, $cfgPort, &$errno, &$errstr, $cfgTimeOut);
[...]
fwrite ($usenet, "show interface description\r\n\n");
[...]
while (!feof($usenet))
{
$r1=fgets($usenet, 1000)."<BR>\n";
}
The program don't exit from while...
.... because the telnet don't give feof.
Hoh can I do?
Thank you in advance,
Andrea.
Navigation:
[Reply to this message]
|