Telnet client written in php
- Telnet to Linux/UNIX servers
- Telnet to network routeres (Cisco IOS , Juniper JUNOS)
- PHP 5.6 or later (PHP 7.0 ready!)
try {
$telnet = new \miyahan\network\Telnet('10.0.0.1');
$telnet->connect();
$telnet->login('username', 'password', 'ios');
$telnet->exec('terminal length 0');
$telnet->exec('enable'."\r\n".'secret');
$telnet->setPrompt('router#');
$result = $telnet->exec('show env all');
echo $result."\n";
} catch (Exception $e) {
echo $e->getMessage();
}
Use composer (https://packagist.org/packages/miyahan/telnet)
- Bestnetwork <[email protected]">
- Dalibor Andzakovic [email protected]
- Matthias Blaser [email protected]
- Christian Hammers [email protected]
- Frederik Sauer [email protected]
- Kouhei Miyasaka [email protected]
MIT