Game Control Panel
<p>Im about to build a custom panel for my site, it will need to talk to a CentOS (linux) Server and do commands like stop, start.
Simple Question is..</p>

<p>..How to i make a PHP site talk to a CentOS server and start/stop processes.</p>

<p>Also there will be many users so the use of a su and /home directory would be needed.</p>

<p>Edit:</p>

<p>So if i have a page for say "A" server I would like to click the Kill Button and have it run for "A"'s process only the command <code>kill -9</code>ps aux | grep --regexp="`netstat -nlept | awk '/:$PORT/ {split($9,t,"/"); print t[1]}'`" | awk '{print $2}'``</p>

<p>This would KILL the process for "A" and only "A".</p>

<p>I have done the work and build the whole dashboard and the made the whole thing, just need to know how to make a command from a php site that will edit the server process.</p>

<p>I build this so far using the info i have googled.</p>

<pre><code>&lt;?php
    $process = new Process('ls -al');

    $process = new Process();
    $process.setPid(my_pid);
?&gt;

&lt;?php
    $process.stop();
    $process.start();
    if ($process.status()){
        echo "The process is currently running";
    }else{
        echo "The process is not running.";
    }
?&gt;
</code></pre>

<p>That is as far as i have gotten iv put a lot of work into this panel. But its this that is stopping me get towards a fully done panel.</p>
