API for Telnet
Posted: Tue Oct 16, 2018 10:16 pm
We have prepared php script for connection via telnet protocol where https://pastebin.com/fhSu20Af has been used. Initial process looks great and we are able to connect but when we want to send some command, everything looks like froozen. ![Image](Clipboard01.png)
Code below:
Could anybody help me where we have an issue?
![Image](Clipboard01.png)
Code below:
Code: Select all
$t = new \Telnet\Telnet("xxx.xxx.xxx.xxx", 23, 10, "");
$t->login("login+cte", "password");
$t->setPrompt(">");
$t->exec("interface");
$t->exec("print");
$t->disconnect();