Ok so I have been trying to figure out how to allow my admins to restart the server over the web. I have tried.
-AND-
I need the .bat file executed because it does all the server maintenance / clean up / respawn vehicles etc. I really think i am just looking at this the wrong way... hoping someone can point me in the right direction.
Code:
<?php
if(isset($_POST['submit']))
{
echo exec('restart.bat');
echo "Done!";
} else {
// display the form
?>
<form action="" method="post">
<input type="submit" name="submit" value="DO IT!">
</form>
<?php
}
?>
-AND-
Code:
<?php
if(isset($_POST['submit']))
{
echo exec("Psexec.exe -i -d restart.bat");
echo "Done!";
} else {
// display the form
?>
<form action="" method="post">
<input type="submit" name="submit" value="DO IT!">
</form>
<?php
}
?>
I need the .bat file executed because it does all the server maintenance / clean up / respawn vehicles etc. I really think i am just looking at this the wrong way... hoping someone can point me in the right direction.