Starting Server
#1

Yes, I know this isnt pawn related, but it's still scripting related to samp. I'm trying to make a script to start/stop my server via PHP. I'm no PHP expert, so i'm trying to learn through this. And please, do not simply link me to another panel, I wanna do this myself.

The issue is the SSH, it doesn't start the server when the function is called.

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");
    
shell_exec('cd /home/purerp/samp');
    
shell_exec('./samp03svr');
}
?>

<form>
<input type="submit" name="start" value="Start Server" />
<input type="submit" name="start" value="Stop Server" />
</form>
Yes, I know start and stop call the same function
Reply


Messages In This Thread
Starting Server - by Mattakil - 03.02.2014, 03:49
Re: Starting Server - by Wizz123 - 03.02.2014, 09:20
Re: Starting Server - by Mattakil - 03.02.2014, 19:49
Re: Starting Server - by Vince - 03.02.2014, 20:09
Re: Starting Server - by Wizz123 - 03.02.2014, 20:16
Re: Starting Server - by Mattakil - 03.02.2014, 20:49
Re: Starting Server - by Mattakil - 03.02.2014, 23:03
Re: Starting Server - by SchurmanCQC - 03.02.2014, 23:05
Re: Starting Server - by San1 - 04.02.2014, 03:59
Re: Starting Server - by Wizz123 - 04.02.2014, 09:13

Forum Jump:


Users browsing this thread: 1 Guest(s)