03.02.2014, 23:05
PHP код:
<?php
if( isset( $_REQUEST['start'] ))
{
StartServer();
echo "<script type='text/javascript'>alert('Server Started');</script>";
}
function StartServer()
{
$connection = ssh2_connect("178.63.193.38", 22);
ssh2_auth_password($connection, "purerp", "teeheeilikepie");
ssh2_exec($connection, 'cd /home/purerp/samp');
ssh2_exec($connection, './samp03svr');
}
?>
<form>
<input type="submit" name="start" value="Start Server" />
<input type="submit" name="start" value="Stop Server" />
</form>

