You are here: telnet problem with PHP « PHP Programming Language « IT news, forums, messages
telnet problem with PHP

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация