Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*-------SETTINGS-------*/
- $ts3_ip = '127.0.0.1';
- $ts3_queryport = 10011;
- $ts3_user = 'serveradmin';
- $ts3_pass = '#tudle';
- $ts3_port = '9987';
- /*----------------------*/
- #Include ts3admin.class.php
- require("ts3admin.class.php");
- $tsAdmin = new ts3admin($ts3_ip, $ts3_queryport);
- if($ts3Admin->getElelement('success', $tsAdmin->connect())) {
- #login as serveradmin
- $tsAdmin->login($ts3_user, $ts3_pass);
- #select teamspeakserver
- $tsAdmin->selectServer($ts3_port);
- $customFieldSet = array();
- $output = $tsAdmin->tokenAdd('0','9','0','Registrační Token',$customFieldSet);
- $html = array2table($output['data']);
- } else {
- echo 'Nelze se připojit k TeamSpeak serveru.'
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Token</title>
- </head>
- <body>
- <br><br>
- <?php echo $html; ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement