Witam!
Mógłby ktoś mi pomóc z połączeniem bazy danych do poniższego kodu?
<?php
session_start();
if (!isset($_SESSION['zaplacono']))
{
header('Location: itemshop.php');
exit();
}
?>
<?php
require_once('Rcon.php');
$nick = $_SESSION['nick'];
$host = 's29.titanaxe.com'; // Server host name or IP
$port = 37786; // Port rcon is listening on
$password = 'haslo'; // rcon.password setting set in server.properties
$timeout = 3; // How long to timeout.
use Thedudeguy\Rcon;
$rcon = new Rcon($host, $port, $password, $timeout);
if ($rcon->connect())
{
$rcon->sendCommand("say hej $nick"); //// say hej... <-- komenda
}
header('Location: itemshop.php');
exit;
?>
Chciałbym żeby za pomocą id wpisywało w pole say.. zmienna $komenda, która zostaje pobrana z tabeli uslugi:
Pozdrawiam