I’m not sure what I’m doing wrong, perhaps I’m missing somthing simple. but I’m trying to issue a command via a PHP telnet session.
I’m connecting via telnet ok, but for some reason the command is not issued. I will admit, I know very little about the subject, but a push in the right direction could be helpful.
I’m just working with a test command right now to see if I can even do it, but Eventually I want to send a small script that will update a user.
My code:
<?php
require_once "PHPTelnet.php";
$telnet = new PHPTelnet();
$result = $telnet->Connect('192.168.1.1','xxxxx','xxxxx');
if ($result == 0) {
$telnet->DoCommand('some command', $result);
echo $result;
$telnet->Disconnect();
}
?>
LIke I said, it connects fine, I can see it log in and out via Winbox Logs, but no command is issued.
Thanks folks.