Código PHP:
<?php
if(isset($_POST["encender"])) {
$directorio = "C:\xampp\htdocs\webftp\servidor";
exec("cd ..$directorio". " &start samp-server.exe");
echo '<script type="text/javascript">alert("Servidor Encendido");</script>';
}
if(isset($_POST["apagar"])){
exec("taskkill /f /im samp-server". ".exe");
echo '<script type="text/javascript">alert("Servidor apagado");</script>';
}
?>
<form action="index.php" method="post">
<input name="encender" id="encender" type="submit" value="encender">
</form>
<form action="index.php" method="post">
<input name="apagar" id="apagar" type="submit" value="apagar">
</form>