View Full Version : [Release] - Simple (Copy & Paste) Join Teamspeak Direct from your webpage HTML code
Current version: v1.0
Author: Kibit
Demo: Here (http://www.wsad.co.uk)
Description: Allow users to join your teamspeak server directly from any of your webpages, Users simply specify a nickname and press a "join button".
Excellent for complete beginners since 0% teamspeak knowledge is required. In just 3 steps they are connected to your teamspeak server..
Step 1 - Install Teamspeak,
Step 2 - Enter a Nickname,
Step 3 Press the "Join Button"
and thats it!
INSTRUCTIONS HERE (http://www.kibithosting.co.uk/join_ts_code/)
Hope you find this useful.
Kibit.
hey
nice thing here :) like it alot. I was just wondering though, I have a password on my TS anyway to set up so that the password is inside the code? Thanks!!
hey
nice thing here :) like it alot. I was just wondering though, I have a password on my TS anyway to set up so that the password is inside the code? Thanks!!
Should be fairly simple but I think I'm missing something out as I can get it to connect when providing a password.
Here is the code so that maybe someone else can have a look and say whats missing or why it does not work...
http://www.kibithosting.co.uk/join_ts_code/index2.html
I have been making a small html document logging me onto a pw protected TS server without luck as well.
<form action="teamspeak://vvv.xxx.yyy.zzz:8767/">
<p>Nickname: <input type="text" name="nickname" /></p>
<p>Password: <input type="text" name="password" /></p>
<p><input type="submit" /></p>
</form>
The output URI from this is "teamspeak://vvv.xxx.yyy.zzz:8767/?nickname=nick?password=pw" but the TS client gives me a "Bad Login (name and/or password wrong)" error. If I type this URI in my browser manually I get logged on succesfully. Removing the pw protection from the server results in the web page logging me in as having the nickname "nick?password=pw" while typing the URI manually logs me in as "nick".
Anyone know what we are doing wrong here? All help appreciated.
I've been working on this for a few days and finally came up with something. The first clue was realizing I had misread the output from my above form. The 'get' method submits forms with a '&' between the value pairs instead of '?'. Seeking help on www.htmlforums.com (http://www.htmlforums.com) I finally got it working.
<FORM action="arrangeurl.php" method="get">
<P>
<LABEL for="nickname">Nickname: </LABEL> <INPUT type="text" name="nickname"><BR>
<LABEL for="password">Password: </LABEL> <INPUT type="text" name="password"><BR>
<INPUT type="submit" value="Join TeamSpeak">
</P>
</FORM>
This form sends the nickname and password on to arrangeurl.php
<?php
$nickname = $_GET['nickname'];
$password = $_GET['password'];
?>
<html>
<?php echo "<body onload=\"javascript:window.location='teamspeak://vvv.xxx.yyy.zzz/?nickname=".$nickname."?password=".$password."'\">";?>
</body>
</html>
arrangeurl.php puts out the login in the correct syntax to launch the TeamSpeak client.
I hope you can use this.
All this makes me wonder why the TeamSpeak client doesn't match the html 'get' method syntax? It would allow for some nice short code to launch the client. I guess theres a reason somewhere.
Why are you first producing a HTML-Page which redirects to the TS-URL?
I think it would be better to redirect the User with the PHP-Script instead which is way better and works also if user does not have JS enabled.
Why are you first producing a HTML-Page which redirects to the TS-URL?
I think it would be better to redirect the User with the PHP-Script instead which is way better and works also if user does not have JS enabled.
If it's not as pretty as it could be I'm blaming it on my lack of knowledge of html and php. :) I only know what I had to learn to make the above. I guess you have a good point though. Making one php script to get the login and launching TeamSpeak in one go would be much nicer. I was not able to get the input, format it, and then getting redirected to the new url at the push of one button so this was the patch I ended up with.
Edit: I think I might have misunderstood you. Rereading your post I'm guessing you are only referring to the php code which outputs html code. My answer is pretty much the same in any case though. I don't know of any other way to achieve the redirecting which the javascript handles.
You may just replace:
<?php
$nickname = $_GET['nickname'];
$password = $_GET['password'];
?>
<html>
<?php echo "<body onload=\"javascript:window.location='teamspeak://vvv.xxx.yyy.zzz/?nickname=".$nickname."?password=".$password."'\">";?>
</body>
</html>
with
<?php
$nickname = $_GET['nickname'];
$password = $_GET['password'];
header("Location: teamspeak://vvv.xxx.yyy.zzz/?nickname=".$nickname."?password=".$password);
die;
?>
I tried using the new script but no matter what I try it keeps giving me a "Cannot find server" error. I double and triple checked every line, swapping strings between the old and new script to no avail. Looking at http://php.net/header i tried swapping 'die' for 'exit' but that didn't make any difference either.
blueflame315
22-05-2006, 20:07
I've been trying to figure out how to add passwords so that a SA can join using their Nickname, Username and password. Unfortunately I can't really figure it out.
The client manual (http://docs.teamspeak-einstieg.de/client-manual-eng/) lists the available parameters in the link, well hidden in the buttom of the 'Menu Connection -> Connect' part. I think the loginname might be what you are searching for. I haven't tested it but a minor modification to my files should do the trick.
<FORM action="arrangeurl.php" method="get">
<P>
<LABEL for="nickname">Nickname: </LABEL> <INPUT type="text" name="nickname"><BR>
<LABEL for="loginname">Loginname: </LABEL> <INPUT type="text" name="loginname"><BR>
<LABEL for="password">Password: </LABEL> <INPUT type="text" name="password"><BR>
<INPUT type="submit" value="Join TeamSpeak">
</P>
</FORM>
<?php
$nickname = $_GET['nickname'];
$loginname = $_GET['loginname'];
$password = $_GET['password'];
?>
<html>
<?php echo "<body onload=\"javascript:window.location='teamspeak://server_ip/?nickname=".$nickname."?loginname=".$loginname."?password=".$password."'\">";?>
</body>
</html>
This will require you to use both php and javascript, but you can try DarkCyrus' suggestion out to avoid the javascript. I would be very interested in getting that to work.
|=HigH^HawK=|
23-05-2006, 14:28
Try this:
<?php
$nickname = $_GET['nickname'];
$password = $_GET['password'];
header("Location: teamspeak://vvv.xxx.yyy.zzz/?nickname=$nickname?password=$password");
die;
?>
Regards
yes its the same that i posted above :D
|=HigH^HawK=|
23-05-2006, 15:56
No really, you forgot to close the Header.
maybe it seems to look so but its just the forum that displays it wrong
Hi, keeping to the theme, but going off on a tangent I have a problem with a form/script set up I've done to login to teamspeak from a webpage.
Basically I'm using a php script to convert the GET from the form to Teamspeaks ? ? ? arrangement, then putting the url into a header.
It works on firefox, but it doesn't work on Internet Explorer. Personally this doesn't bother me, but apparently the people who use the website would prefer not to change.
Any idea why this might happen?
I haven't posted the script because it really is exactly like the ones above.
According to my experiences with this, some Internet Explorer installations don't handle the TeamSpeak links correctly. Some say "unknown protocol", some completely ignore clicks on TeamSpeak links. I don't know why and I don't know how to fix it.
But I can confirm this problem and it's definitly not your fault. And this is again something that makes me say: Internet Exploder really sucks :p
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.