I host game servers and I am looking for a way to control a game server through a php page. My game server is started using a batch file and is stopped by closing the process.
Basically, I’m trying to create a button that will start the server and a button that will stop the server. I’d also like to keep it secure as well.
So far the best thing I’ve come up with is this:
[php]<?php
if(isset($_POST[‘submit’]))
{
exec(‘runme.bat’);
} else {
// display the form
?>
This starts the batch file but the webpage is in a state of constantly waiting for host until I close the process.
Keep in mind I’m fairly new to php.
Thanks