Results 406 to 420 of 627
Thread: [API] TS3 PHP Framework
-
15-02-2012, 18:51 #406
-= TeamSpeak User =-
- Join Date
- Feb 2012
- Posts
- 5
Hello. I'm wondering if there is way to get this teamspeak viewer tree (web viewer) to work without having server username and password (rcon).
-
15-02-2012, 22:15 #407
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,296
Sure... but you'll need to assign the required permissions to your ServerQuery guest group. This might help:
http://static.tsviewer.com/images/fa...issions_en.png
http://www.tsviewer.com/index.php?page=faq
-
16-02-2012, 08:02 #408
-= TeamSpeak User =-
- Join Date
- Feb 2012
- Posts
- 5
Alright. And can you show me an example of how would query look?
This is how it looks at the moment:
Thanks.PHP Code:$ts3 = TeamSpeak3::factory("serverquery://hostname:voiceport/?server_port=queryport#no_query_clients");
Last edited by dino_ninefive; 16-02-2012 at 08:26.
-
16-02-2012, 08:30 #409
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,296
-
16-02-2012, 08:40 #410
-= TeamSpeak User =-
- Join Date
- Feb 2012
- Posts
- 5
Well, this:
is that correct?PHP Code:$ts3 = TeamSpeak3::factory("serverquery://hostname:queryport/?server_port=voiceport#no_query_clients");
Last edited by dino_ninefive; 16-02-2012 at 08:59.
-
16-02-2012, 13:20 #411
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,296
Yes. But this will only connect.
-
16-02-2012, 20:24 #412
-= TeamSpeak User =-
- Join Date
- Feb 2012
- Posts
- 5
So what do I have to do after that? This is how the code looks at the moment.
I actually took this from viewer example..PHP Code:require_once("ts3_framework/TeamSpeak3.php");
$tpl = new Templates();
// Check to see if the user is banned.
if(isBanned($_ENV['userdata']->data['user_id'])) {
$error = new Error("403.1");
$error->Output();
}
/* Attempt to try and catch
*/
try
{
/* Query with config values
* and create an new obj
* for the virtual server at
* existing port.
*/
$ts3 = TeamSpeak3::factory(
"serverquery://hostname:queryport/?server_port=voiceport"
);
/* Enable display mode */
$ts3->setLoadClientlistFirst(TRUE);
/* Display viewer for TeamSpeak3_Node_server */
echo $ts3->getViewer(
new TeamSpeak3_Viewer_Html(
"ts3_framework/images/viewer/", "ts3_framework/images/flags/", "data:image"
)
);
/* Display runtime from adapter profiler */
echo "<p>Executed "
. $ts3->getAdapter()->getQueryCount() .
" queries in "
. $ts3->getAdapter()->getQueryRuntime() .
" seconds</p> <br />\n"
;
}
catch(Exception $e)
{
/* Echo existing error message */
echo "<p><span class=\"error\"><b>ERROR 0x"
. dechex($e->getCode()) .
"</b>: "
. htmlspecialchars($e->getMessage()) .
"</span></p>";
}
-
16-02-2012, 20:58 #413
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,296
Your code snippet looks like it should work.
-
17-02-2012, 14:08 #414
Hey ScP,
sometimes i got the error message "invalid client id" in the events "notifyCliententerview", "serverqueryWaitTimeout", "notifyTextmessage"
This error message seems to ocours only if the client unique identifier didn't contains a "/"
What can i do to solve this error?
-
17-02-2012, 17:12 #415
-= TeamSpeak Lover =-
- Join Date
- Dec 2009
- Location
- Poland
- Posts
- 43
Are there any methods to disconnect query client after executed function?
Sometimes I can see on my instance the error:
Next problem, on snapshotDeploy I have this error:Code:Error 515: max clients protocol limit reached
but snapshot worksCode:Notice: Undefined index: sid in /myPath/TeamSpeak3/Node/Server.php on line 1853

The 1853. line:
Code:TeamSpeak3_Helper_Signal::getInstance()->emit("notifyServercreated", $this->getParent(), $detail["sid"]);Last edited by Dream; 17-02-2012 at 18:21.
-
17-02-2012, 18:22 #416
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,296
Could you paste the snippet of code that's causing this issue? I've noticed this too while working on one of my own projects, but it seems to be a server bug. Sometimes, a notification sneaks in and breaks the output of other commands. Another user already reported a similar bug here:
http://forum.teamspeak.com/showthread.php/70399
Anyway... I'll have a look at this and if there's something I can fix on my end, I'll fix it.
I've implemented the disconnect procedure in the deconstructor of each class based on TeamSpeak3_Adapter_Abstract so the script should disconnect when it's stopped. When you want to disconnect manually, just do this:
Damn. You've found a pretty stupid bug there. Fixed with version 1.1.12.PHP Code:// manually disconnect but keep object (script will reconnect if another query is executed)
$ts3->getAdapter()->disconnect();
// destory object (script will disconnect automatically)
unset($ts3);

Code:=== Release 1.1.12 - 18 Feb 2011 === ! unless any major/critical bugs are found, this will be the last version of the framework before the official 2.0.0 release - TeamSpeak3_Viewer_Html::getCorpusName() no longer truncates name of channel spacers - fixed broken TeamSpeak3_Node_Server::snapshotDeploy() method
Last edited by ScP; 17-02-2012 at 23:53.
-
18-02-2012, 13:05 #417
Here are the code snippet you've asked for. I've determinated these lines to causing the error.
PHP Code:$client = $host->serverGetSelected()->clientGetById($event['clid']);
if you want to have the full source code, please pm me.PHP Code:$node = $adapter->getHost()->serverGetSelected()->clientGetByUid($client['client_unique_identifier']);
-
02-03-2012, 14:24 #418
-= TeamSpeak User =-
- Join Date
- Jun 2011
- Posts
- 4
Hmm.. i'm trying to figure out what's going on here....
when i use webinterface... it says on default port:
<?= $this->defaultPort; ?>
what could this be?
-
05-03-2012, 00:22 #419
-= TeamSpeak User =-
- Join Date
- Mar 2012
- Posts
- 1
Hey guys..
first of all i wanna thank ScP for the awesome tool (at least it looks awesome)!
then, as ive no idea bout php and stuff, i wanted some lights bout how to set this thing up..
ok so.. ive got a teamspeak server running on a work's pc (which stays on like forever) and at the same pc i installed "WAMPSERVER2.2"
then i extracted the files from the zipped file that you ve uploaded and changed the password on the config file...
im opening the /example/index.php and i get the "TeamSpeak 3 PHP Framework Test Page" (ofc :O) so..
clicking the "TeamSpeak Web Status Viewer", seems to work well cause i can see every1 that is connected to the server..
BUT the feature that i need, the Web Control Panel, fails..
[i mentioned again that i have NO idea bout php and stuff.. just to control the server over web]
so when i click "TeamSpeak Web Control Panel" on the test page, it loads up the form to fill the 4 fields:
...Server Address: [empty]
...Server Port: <?= $this->defaultPort; ?>
...Username: [empty]
...Password: [empty]
i fill the info and leave the server port field as it is.. click login --> 403: Forbidden, You don't have permission to access /examples/apps/webinterface/< on this server.
any help would be like awesome!
thnx in advance!
<3
-
05-03-2012, 10:18 #420
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,296
First, please note that the examples are not meant to be used in a production environment. They are picked as an easy way to illustrate how the TS3 PHP Framework can be used to create your own web-based applications.
Anyway, to fix the issue you're describing, you need to edit your php.ini file. Search for a directive called short_open_tag and set its value to On. Here's the description for this directive:
http://www.php.net/manual/en/ini.cor...short-open-tag
But again... if you do not intend to use the framework files to create your own stuff, please consider using another ready-to-use web interface solution from this page:
http://addons.teamspeak.com/director...web-based.html
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
TS3 PHP Framework Connection problems
By stheam in forum General QuestionsReplies: 1Last Post: 01-01-2013, 21:03 -
Extraction using the Framework
By HarryMW in forum ToolsReplies: 1Last Post: 03-08-2012, 19:04 -
TeamSpeak 3 PHP Framework
By danger89 in forum General QuestionsReplies: 3Last Post: 11-06-2012, 16:40 -
Teamspeak, PHP Framework?
By mario2027 in forum General QuestionsReplies: 1Last Post: 21-12-2010, 09:30 -
[solved] Problem with Ts3 und Ts3 Php Framework
By m3ntry in forum Bug ReportsReplies: 1Last Post: 14-10-2010, 05:55


Reply With Quote




