How do call php script command with libssh2 [Ctrl]+[C] ?
PHP Code:
<?php
$server['ip'] = "127.0.0.1";
$server['sshport'] = 22;
$server['user'] = "root";
$server['pw'] = "password";
$command = $_GET['command'];
$time = $_GET['time'];
if($ssh = ssh2_connect($server['ip'], $server['sshport'])) {
if(ssh2_auth_password($ssh, $server['user'], $server['pw'])) {
$stream = ssh2_exec($ssh, $command);
}else {
echo "Error: Could not connect to the selected server, incorrect username or password..";
}
}else {
echo "Error: Could not connect to the selected server, SSH server IP or port wrong..";
}
sleep($time);
CONTROL + C ??????????
?>