Results 1 to 15 of 348
-
30-03-2005, 03:31 #1
New Teamspeak Query script for php: Teamspeak Display
In the past week i've been writing a new teamspeak query script for use on php-supporting webservers. This script queries a teamspeak server through it's TCP query port and displays all channels and players that are logged in to the teamspeak server on a webpage.
Browsing this forum you can see there are already scripts to do what my script does so you might wonder why i decided to write a new one. Well most importantly the current scripts (or at least the scripts I know) weren't able to view subchannels correctly, didn't show peoples nicknames correctly when there is a whitespace in it and the channels and players weren't sorted in the right order.
The first version (Preview Release 1) of this script is now available through SourceForge. I have released it under the GNU General Public License which grant you the right to use, redistribute and/or modify the script freely (under certain terms of course, see the license for details).
Visit the project page here: http://tsdisplay.sourceforge.net
Look at the screenshots here: http://sourceforge.net/project/scree...roup_id=135177
Download Preview Release 1 here: http://prdownloads.sourceforge.net/t...1.zip?download
You already have a teamspeak script running and you don't think it's worth the hassle of switching to another one? I'll list the advantages of Teamspeak Display over other teamspeak query scripts I found:
- Shows names correctly when they begin with a whitespace.
- Shows the full name instead of a partial name when it contains whitespaces.
- Displays names with html in them without letting the browser interpret that html.
- Supports unregistered users being server admin.
- Displays the AO, AV, O, V, WV and Rec player statusses.
- Displays subchannels correctly instead of listing them as if it is a normal channel.
Note: teamspeak lists subchannels before players in the superchannel, I chose to list
the players before the subchannels as teamspeak's order confuses many people because
the players below the last subchannel are suspected to be in the last subchannel.
- Displays the channel status behind a channelname (like teamspeak itself does) instead
of displaying the current and maximum number of players.
- Displays the channels in the right order (almost, might be improved in next release).
- Displays the players in the right order (almost, might be improved in next release).
- Uses a tree-structure that matches the one you are used to see (no unused unterminated
lines anymore).
- Shows usefull information in tooltip popups when you hover your mouse over a servername,
channelname or playername (works in Mozilla Firefox too).
- Uses the original teamspeak server logo you are used to see in the teamspeak status
window
- Shows the servername which is queried from the teamspeak server instead of asking you,
the webdeveloper to specify a name in your configuration.
- Lets you login by clicking the servername (a question regarding your nickname and
eventually the server/channel password will popup)
- Doesn't ask you for more or less info than it needs when you log in to a teamspeak
server. For example: you won't be asked for a channel password if you want to join a
channel which isn't passworded, but you will be asked for a channel password if the
channel is protected by a password.
- Lets you login to a specified channel by clicking one.
- It's released under the GNU GPL license so you can use, redistribute and modify it
under the terms of this license.
However one thing has to be said: this is a Preview Release, so it has only been tested by a few people. This means the script could behave unexpectedly under some conditions. If you find the script to behave
weird, please give me a pm so I can take a look at it.Last edited by MrGuide@NL; 27-04-2005 at 10:32.
-
30-03-2005, 07:47 #2
-= TeamSpeak Addict =-
- Join Date
- Jul 2004
- Location
- Dallas
- Posts
- 113
Looks to have good potential. make it flexible and customizeable such as Gryphon's and you may have a pretty nice thing goin here
-
31-03-2005, 08:22 #3
-= TeamSpeak Lover =-
- Join Date
- Feb 2005
- Location
- Netherlands
- Posts
- 32
script running at http://www.dmpclan.nl
meaby you can make the channels BOLD or mark it with an color ? so you can see difference between channels and subchannels
because this is verry poorly organized
Last edited by Dennisbier; 29-01-2008 at 11:50.
-
31-03-2005, 17:41 #4
K, good to see the script applied to another teamspeak server. While looking at it I found a few problems which is why I made an update (Preview Release 2) today.
Download Preview Release 2 here: http://prdownloads.sourceforge.net/t...2.zip?download
The following things were changed in Preview Release 2
* Fixed HTML 4.01/Transitional compatibility (the div tag containing the teamspeak
display had an invalid attribute "name")
* Fixed an error in the login javascript; a typo in the script tag made internet explorer
throw an error when trying to login by clicking a channelname or the servername
* Fixed a problem with hostnames containing characters which are not allowed in javascript
function names. Because of this the script could stop working in certain browsers when
using a hostname containing a dash for example was used. Previously the login functions
included the server-address in their name, now they include an md5-hash of the server-
address in their name. Due to this all hostnames can now be used as server address.
* Fixed a problem with channelnames containing single-quote charachters. These
channelnames caused the login script to fail and throw an error when clicking the
channelname in Teamspeak Display.
* Made the channels bold so they are easy to distinguish from players
To update from Preview Release 1 you need to replace the following files:
* teamspeakdisplay/teamspeakdisplay.php
* teamspeakdisplay/teamspeakdisplay.css
-
31-03-2005, 21:48 #5
-= TeamSpeak User =-
- Join Date
- Mar 2005
- Location
- England
- Posts
- 3
Need Help
Hi Great piece of php
but unfortunately i got an error nd as its your code wondering if u cud advise pls see the error print screen at
http://82.37.194.58/img.jpg
thanks in advance
Spaggy
-
01-04-2005, 15:52 #6
-= TeamSpeak Lover =-
- Join Date
- Feb 2005
- Location
- Netherlands
- Posts
- 32
installed last verson
but channels are not bold
-
02-04-2005, 12:39 #7Sorry, but I cannot access that url as the host is offline, so I can't see the error.
Originally Posted by spaggy
Looking at http://dhost.info/dmpc/teamspeakdisp...eakdisplay.css you still have the old teamspeakdisplay.css file on your host. To update from Preview Release 1 you need to replace the following files with the files included in the new package (or the ones I gave you):
Originally Posted by Dennisbier
* /dmpc/teamspeakdisplay/teamspeakdisplay.php
* /dmpc/teamspeakdisplay/teamspeakdisplay.cssLast edited by MrGuide@NL; 02-04-2005 at 13:54.
-
02-04-2005, 15:29 #8
-= TeamSpeak User =-
- Join Date
- Apr 2005
- Location
- NC
- Posts
- 3
Do you have a howto file? I have it working, but I'm trying to figure out how to put it into a block so that it can be place to the left or right, possible down the middle of my site. www.maksquad.com
I've tried to add it to a module, but get an error. Any ideas?
Edit:
Sorry, I'm a numb nutt, I've got it working as a module, but is there a way that I can get it to work as a block to put on the left?
Is it possible to change the background color? If so, I haven't found it. Which file would I change it in? That's would be what I need to know.
Thanks,
ProtoLast edited by Proto; 02-04-2005 at 16:04.
-
02-04-2005, 20:44 #9
-= TeamSpeak Fanatic =-
- Join Date
- Oct 2004
- Location
- Germany
- Posts
- 1,710
At first: nice script.
But please Check some things at first you often used array keys without quoting them e.g. $array[key] so your script throws hundreds of notices that it is expecting some contant (just set error_reporting(E_ALL) to reproduce the error)
And some info: I am also currently working on some PHP-Projects about TeamSpeak and while rewriting my TeamSpeak-Query Class I noticed that feof($socket) will not work with the TeamSpeak Socket connection so i had several server crashes because of this. Tested it on 3 different webservers, everywhere same problems. Had to do some stupid (but working) workaround.
You use:
do {
} while (($buffer != "OK") && (!feof($socket)));
It works cause of $buffer != "OK" but if you get an error for any reason (I tried it) the script does the next fread/fgets and so waits for data from TS server but TS Server won't send any data so the script won't end.
My workarund for this is ($cRead is same as your $buffer but not stripped):
do {
} while ($cRead != "[TS]\r\n" && $cRead != "OK\r\n" && strtoupper(substr($cRead, 0, 5)) != "ERROR");
-
03-04-2005, 00:05 #10
-= TeamSpeak User =-
- Join Date
- Apr 2005
- Location
- UK
- Posts
- 3
Hi guys,
Mine doesnt work
- I added my IP 82.136.36.20:8870
it says server offline any help?<?php
//====================== BEGINNING OF CONFIGURATION PART =====================
// The teamspeak server IP or Hostname: (DO NOT INCLUDE THE PORT NUMBER)
$serverAddress = "82.136.36.20";
// The teamspeak server port you use to connect to the teamspeak server using a teamspeak client
$serverUDPPort = 8870;
// The teamspeak query port of your server (look in the server.ini of your teamspeak server for
// this portnumber)
$serverQueryPort = 51234;
//====================== END OF CONFIGURATION PART ===========================
// Is the script improperly configured?
if ($serverAddress == "82.136.36.20:8870") { die("You need to configure this script by setting the serverAddress and eventually the serverUDPPort and serverQueryPort in the sourcecode<br>\n"); }
?>
-
03-04-2005, 00:22 #11m&m's Guest// The teamspeak server IP or Hostname: (DO NOT INCLUDE THE PORT NUMBER)
Originally Posted by Forbidden
$serverAddress = "82.136.36.20";
also make sure the 51234 port is not being blocked at the source ie your web host ! a firewall , routers etc
-
03-04-2005, 12:36 #12
-= TeamSpeak User =-
- Join Date
- Nov 2004
- Location
- Germany
- Posts
- 8
can someone tell me how to install this great script?
-
03-04-2005, 14:36 #13
-= TeamSpeak User =-
- Join Date
- Apr 2005
- Location
- NC
- Posts
- 3
Look in your demo.php change the top to match your TS2, and that should get you started. Then it's up to you to customize it. Upload files.
PHP Code:<?php
//====================== BEGINNING OF CONFIGURATION PART =====================
// The teamspeak server IP or Hostname: (DO NOT INCLUDE THE PORT NUMBER)
$serverAddress = "SERVER GOES HERE";
// The teamspeak server port you use to connect to the teamspeak server using a teamspeak client
$serverUDPPort = PORT GOES HERE;
// The teamspeak query port of your server (look in the server.ini of your teamspeak server for
// this portnumber)
$serverQueryPort = 51234;
//====================== END OF CONFIGURATION PART ===========================
-
03-04-2005, 15:45 #14
-= TeamSpeak User =-
- Join Date
- Apr 2005
- Location
- NC
- Posts
- 3
Never mind on this question, I didn't know that you could add it like html.
Originally Posted by Proto
Anyone created a block out of this?PHP Code:<body bgcolor="#008080">
Thanks
-
03-04-2005, 19:30 #15m&m's Guest
in my sig i have a location for a php block made by PKI
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
What is the internal sort order used by teamspeak?
By MrGuide@NL in forum [TeamSpeak 2] Client SupportReplies: 2Last Post: 05-04-2005, 23:41 -
Start stop script for TeamSpeak daemon (init)
By Cybernaut in forum [TeamSpeak 2] Server SupportReplies: 2Last Post: 11-11-2004, 17:07 -
TeamSpeak Server won't report Statistics to your Webserver/PHP Script
By T. Boonstra in forum [TeamSpeak Classic] General QuestionsReplies: 0Last Post: 21-06-2002, 21:00



Reply With Quote