Results 1 to 7 of 7
-
28-12-2009, 17:31 #1
-= TeamSpeak Lover =-
- Join Date
- Dec 2009
- Location
- Germany
- Posts
- 32
Create token by php script and mysql
How can i create a token? Dont know parameters and if this contains MD5 decrypt and so on.
I want to create a "Normal" Group token, via web page with php. With this token user get voice power in channel.
-
28-12-2009, 17:38 #2
-= TeamSpeak Addict =-
- Join Date
- Dec 2009
- Location
- Europe
- Posts
- 184
Write a PHP script around the following command sequence:
(connection on serverquery port)
...TS3
use 1
... error id=0 msg=ok
login serveradmin PASSWORD
... error id=0 msg=ok
tokenadd tokentype=0 tokenid1=7 tokenid2=0
(create a token for the Normal server group (7))
token=XXXXXXXXXXXXXXXXXXXX
... error id=0 msg=ok
tokenadd tokentype=1 tokenid1=7 tokenid2=1
(create a token for Voice (7) channel group in server channel (1))
token=XXXXXXXXXXXXXXXXXXXX
... error id=0 msg=ok
logout
... error id=0 msg=ok
quit
(disconnect)
-
28-12-2009, 17:55 #3
-= TeamSpeak Lover =-
- Join Date
- Dec 2009
- Location
- Germany
- Posts
- 32
OK, is there a direct way via php and mysql?
-
28-12-2009, 18:12 #4
-= TeamSpeak Addict =-
- Join Date
- Dec 2009
- Location
- Europe
- Posts
- 184
Do a search in this forum, if you feel that you cannot write the php code yourself:
http://forum.teamspeak.com/forumdisplay.php?f=114
-
28-12-2009, 18:15 #5
-= TeamSpeak Lover =-
- Join Date
- Dec 2009
- Location
- Germany
- Posts
- 32
Yes, right i can coding but your solution is the bad way if you have full access to the database, right?
I found a very easy to do that!
Fill out all fields in mysqldb where the table token is. Just create a key by your self and thats it.
This code are 3-5 lines if you have a contentsystem with a connected db.
Why so complicated?
-
28-12-2009, 19:28 #6
-= TeamSpeak Lover =-
- Join Date
- Dec 2009
- Location
- Germany
- Posts
- 32
For someone who need a little script:
It will generate a token on server(1) with user group normal(7). $tkey u can use this key to send it per mail or show it on website.PHP Code:srand((double)microtime()*1000000);
$tkey = substr(md5(rand(0,9999999)),0,20);
$tsinsert = "INSERT INTO tokens (server_id, token_key, token_type, token_id1, token_id2) VALUES ('1', '$tkey', '0', '7', '0')";
$tsdbinsert = mysql_query($tsinsert);
-
28-12-2009, 19:31 #7
-= TeamSpeak Addict =-
- Join Date
- Dec 2009
- Location
- Europe
- Posts
- 184
Thank you for sharing your code. Originally I was unaware of the fact that you wanted direct database interaction.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Linux + MySQL HOWTO with sys init script
By SShaadd in forum Linux / FreeBSDReplies: 5Last Post: 22-12-2009, 17:25 -
Teamspeak on Mysql , create and stat subserveur
By andrelec1 in forum [TeamSpeak 2] Server SupportReplies: 6Last Post: 03-09-2009, 17:38 -
FreeBSD and MySQL
By Paterson in forum [TeamSpeak 2] Server SupportReplies: 1Last Post: 18-01-2006, 08:35 -
MySql & PhP & Teamspeak
By Samadhi in forum [TeamSpeak 2] Server SupportReplies: 5Last Post: 29-09-2004, 13:59 -
Help on SQLite script to create client
By osward in forum [TeamSpeak 2] Server SupportReplies: 0Last Post: 24-08-2004, 05:03


Reply With Quote