English CS2D Screen Via PHP

3 replies
Goto Page
To the start Previous 1 Next To the start
31.08.15 01:56:09 pm
Up
Marcell
Super User
Offline Off
Hey,

I trying to get work screen via PHP (execute it), but its not really want to work, even i tired to find any related to Google, nothing helped.

Its says Must be connected to terminal.

How could i execute cs2d_dedicated with parameters like (-name -port, etc) via PHP?

I even tried with sh script, with no luck
31.08.15 02:13:17 pm
Up
TimeQuesT
User
Offline Off
Example

Code:
1
exec('blah/blah2/CounterStrike2D/cs2d_dedicated -port'.$port);
Muh
31.08.15 02:15:27 pm
Up
Hajt
User
Offline Off
I'm using phpseclib on my website and everything working very well.

Example
Code:
1
2
3
4
5
6
7
8
9
include('Net/SSH2.php');
$ssh = new Net_SSH2('185.12.178.251', $port);
if ($ssh->login($login, $password)) {
     mysqli_query($link, "UPDATE servers SET status='online' WHERE id = '$id'");
     echo $ssh->exec("screen -dmS cs2d_dedicated /home/$login/cs2d_dedicated");
     echo '<div class="alert alert-success" role="alert">The server has been started</div>';
} else {
     echo '<div class="alert alert-danger" role="alert">Login Failed</div>';
}
31.08.15 03:08:04 pm
Up
Marcell
Super User
Offline Off
Thanks!
To the start Previous 1 Next To the start