Panel Utilisateur TeamSpeak (PHP)

  • Initiateur de la discussion
TheGmader

TheGmader

Geek suprême
Messages
440
Score réaction
62
Points
150
Bonjour,
Je viens de créer deux fichiers php pour avoir un panel pour les utilisateurs de mes TeamSpeaks !
Code:
<?php
include './include/init.php';
$prob = "";
$action = "";
?>
<!DOCTYPE html>
<html xmlns="http://htmlbs.mtxserv.fr/hebergets3" xml:lang="fr" lang="fr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Panel TeamSpeak 3</title> </head> <body> <?php if (!empty($_GET['action'])) { if ($_GET['action'] == "start") { fwrite($socket, "serverstart sid=2\r\n"); $action = "Le serveur a bien été démarrer !"; } if ($_GET['action'] == "stop") { fwrite($socket, "use 2\r\n"); fwrite($socket, "serverstop sid=2\r\n"); $action = "Le serveur a bien été eteint !"; } } echo $action; echo $prob; ?> <a href="index.php?action=start">Démarrer</a> <a href="index.php?action=stop">Eteindre</a> </body>
</html>

Code:
<?php $adress = "*4*.91.8*.1*6"; $port = 1; $socket = fsockopen($adress, $port); if (!$socket) { $prob = "ERREUR"; } else [ fwrite($socket, "login LOGIN MDP\r\n") ]
?>

Et je voudrais que quand je clique sur éteindre ou allumer il agisse sur le serveur *4*.91.8*.1*6 ayant le port 1 ! Mais il me dit qu'il n'arrive pas a se connecter :
Code:
Warning: fsockopen(): unable to connect to 149.91.88.176:1 (Connection refused) in /var/www/htmlbs.mtxserv.fr/public_html/hebergets3/include/init.php on line 4
Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/htmlbs.mtxserv.fr/public_html/hebergets3/index.php on line 23
Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/htmlbs.mtxserv.fr/public_html/hebergets3/index.php on line 24

Si quelqu'un pourrait me donner un coup de main !
Cordialement
TheGmader
 
Discord d'entraide
Rejoignz-nous sur Discord