Hello, I want to start my server through a website with a button, but I cannot start it. I cannot use this button when the server is down. How can I use this button even if the server is down?
if(isset($_POST["ts3_start"])){
$stmt = $pdo->prepare("SELECT * FROM servers WHERE id = :id");
$stmt->bindParam(':id', $sunucu_id);
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$islem_mesaj = "<span class='alert alert-success rounded-5 d-flex justify-content-center'>Sunucu başarıyla başlatıldı!</span>";
header("Refresh:2");
$tsip = $row['tsip'];
$queryport = $row['queryport'];
$useradi = $row['useradi'];
$querypass = $row['querypass'];
$port = $row['port'];
$ts3_VirtualServer = TeamSpeak3::factory("serverquery://$useradi:$querypass@$tsip:$queryport/?server_port=$port&blocking=0");
$sunucu_id = $ts3_VirtualServer->serverIdGetByPort($port);
$ts3_VirtualServer->serverStart($sunucu_id);
}