Results 196 to 210 of 629
Thread: [API] TS3 PHP Framework
-
18-01-2011, 09:45 #196
-= TeamSpeak Guru =-
- Join Date
- May 2010
- Posts
- 6,372
Do you add the IP of the web server on the query_ip_whitelist file ?
Do you set up correctly the permission in the Guest Query Group ?
The query port is open on the firewall (if there is one) ?
-
25-01-2011, 02:01 #197
-= TeamSpeak User =-
- Join Date
- Dec 2006
- Location
- Rio de Janeiro / BRAZIL
- Posts
- 11
Error 0: connection to server 'hidden:10011' lost
Why I receive this error?
My servers is online, and my script run, but lost connection.
With serveradmin account I received this message:
Error 3331: flood ban
-
25-01-2011, 05:04 #198
-= TeamSpeak Addict =-
- Join Date
- Jun 2003
- Posts
- 246
Is the IP address from which the script is run whitelisted on the server?
-
25-01-2011, 16:59 #199
-= TeamSpeak User =-
- Join Date
- Dec 2006
- Location
- Rio de Janeiro / BRAZIL
- Posts
- 11
No... xD
I can only edit in the file? Can I edit the whitelist from teamspeak 3 client?
EDIT:
File edited, and I receive the same message:
Error 3331: flood banLast edited by jujubins; 25-01-2011 at 17:21.
-
26-01-2011, 01:01 #200
-= TeamSpeak Addict =-
- Join Date
- Jun 2003
- Posts
- 246
What script are you running that produces this error?
-
28-01-2011, 08:12 #201
-= TeamSpeak User =-
- Join Date
- Apr 2010
- Location
- Serbia
- Posts
- 2
any chance for joomla 1.6 add on ?
-
29-01-2011, 18:52 #202
-= TeamSpeak User =-
- Join Date
- Jan 2011
- Posts
- 6
Hi ScP,
I want to give your framework a try on my Joomla webpage but I get the same Error Message Teris Cooper got before:
I get the Error on both: My local testing enviroment and my webserver too. On my local computer I use PHP 5.3.1 and on my root server is PHP Version 5.2.6-1+lenny9 running. The TS3 PHP Framework is version 1.1.3 beta.Warning: uasort() [function.uasort]: Array was modified by the user comparison function in C:\xampp\htdocs\ts3fw\libraries\TeamSpeak3\Node\Se rver.php on line 0
ERROR 0x602: invalid parameter
About my configuration:
The TS3 Server is not on my root server so I entered the IP address in the configuration file. Also it's not password protected so I left the password value empty within the configuration file.
I noticed that the Error is called from "TeamSpeak3_Adapter_ServerQuery_Reply::toAssocArra y($ident)" within "reply.php" but I don't know why and how.
Edit:
I could solve the warning now. Therefore I had to edit "/libraries/TeamSpeak3/Adapter/ServerQuery/Reply.php" and had to edit the function "toAssocArray($ident)".
Original:
change to:Code:public function toAssocArray($ident) { $nodes = (func_num_args() > 1) ? $this->toArray(1) : $this->toArray(); $array = array(); foreach($nodes as $node) { if(array_key_exists($ident, $node)) { $array[(is_object($node[$ident])) ? $node[$ident]->toString() : $node[$ident]] = $node; } else { throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid parameter", 0x602); } } return $array; }
In short words you have to change "array_key_exists" into "property_exists" and afterwards you have to transform the second Parameter "$node" what is an array into a string ("(string)$node").Code:public function toAssocArray($ident) { $nodes = (func_num_args() > 1) ? $this->toArray(1) : $this->toArray(); $array = array(); foreach($nodes as $node) { if(property_exists($ident, (string)$node)) { $array[(is_object($node[$ident])) ? $node[$ident]->toString() : $node[$ident]] = $node; } else { throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid parameter", 0x602); } } return $array; }
The Error 0x602 is caused because "array_key_exists" / "property_exists" returns "false". But why?
Edit 2:
Now I also figured out how on earth the Error is caused:
It's caused because of "/libraries/TeamSpeak3/Node/Server.php" and there within "function channelList(array $filter = array())". The function "toAssocArray" (that generates the Error) is called with a value called "cid". But this value is not within "$node" (check the function mentioned earlier above) so "array_key_exists" / "property_exists" returns "false" and the function "toAssocArray" generates the Error.Last edited by Grinsekatze; 30-01-2011 at 11:11.
-
30-01-2011, 14:06 #203
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,298
Thank you for reporting this. A fix will be included in the next release.
-
30-01-2011, 16:13 #204
-= TeamSpeak User =-
- Join Date
- Jan 2011
- Posts
- 6
Unlikely I still get the Error Message:
ERROR 0x602: invalid parameter
I just figured out that it has to do with the channel listing. When I echo $ident and print_r($node) it says: $ident == 'cid'.
Within the array i get a lot of "cid" 's.
So I don't know why on earth the error is generated.
it's this lines of code I think:
Code:if(array_key_exists($ident, $node)) # if(property_exists($ident, (string)$node)) { $array[(is_object($node[$ident])) ? $node[$ident]->toString() : $node[$ident]] = $node; } else { throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid parameter", 0x602); }
Edit:
Ok, seems as if my first trys got me to the wrong direction.
After I checked the whole framework again I noticed that there are several files which can cause an Error 0x602.
The one mentioned before (/libraries/TeamSpeak3/Adapter/ServerQuery/Reply.php), /libraries/TeamSpeak3/Adapter/ServerQuery/Event.php, /libraries/TeamSpeak3/Node/Server.php and /libraries/TeamSpeak3/Node/Abstract.php .
After I added some debug informations I noticed that this 0x602 is caused by /libraries/TeamSpeak3/Node/Abstract.php and thats the coresponding code to it:
Unlikely I have no Idea what I can solve here. Someone has an IDea or can point me in the right direction?Code:/** * @ignore */ public function offsetGet($offset) { if(!$this->offsetExists($offset)) { $this->fetchNodeInfo(); } if(!$this->offsetExists($offset)) { throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid parameter", 0x602); } return $this->nodeInfo[(string) $offset]; }Last edited by Grinsekatze; 30-01-2011 at 17:16.
-
31-01-2011, 16:51 #205
-= TeamSpeak User =-
- Join Date
- Jan 2010
- Location
- Munich, Germany
- Posts
- 9
Hi and thanks for this awesome framework.
I'm using the default viewer script on our clan page, and have noticed that every client has a country flag, but some have none. Now my question, where do the viewer get the flag infos, maybe something like MaxMind GeoIP, or from the TS server itself?
http://i53.tinypic.com/ih5r29.png
In this case "The Skull" should have a Slovenia flag.
And it would be nice, if there could be a default flag, if the origin of the client can't resolved instead of none, like:
http://i55.tinypic.com/2z4lqf8.png
Thanks in advanced and keep up the good work!
-
01-02-2011, 10:58 #206
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,298
My example viewer interface class is using the client_country property to decide which flag icon needs to be shown - just like the TeamSpeak 3 Client does. I've taken all the country flag images from the TeamSpeak 3 Client install directory, but it's possible that some new flags were added so they're probably just missing in the framework package.
In short... If the correct flag is shown in your TeamSpeak 3 Client, just copy all the flag images out of your install directory onto your webserver.

I'll think about that default flag option.
-
01-02-2011, 12:18 #207
-= TeamSpeak User =-
- Join Date
- Jan 2010
- Location
- Munich, Germany
- Posts
- 9
Ah thanks, the client didn't have a flag in the teamspeak client as well. But with your hint I now understand your code and changed it a bit to make the "NoFlag" flag to show up:
libraries/TeamSpeak3/Viewer/Html.php
Result: http://i52.tinypic.com/29z6jom.pngPHP Code:/**
* Returns a HTML img tag which can be used to display the country flag for a
* TeamSpeak_Node_Client object.
*
* @return string
*/
protected function getSuffixFlag()
{
if(!$this->currObj instanceof TeamSpeak3_Node_Client) return;
if($this->flagpath && $this->currObj["client_country"])
{
return $this->getImage($this->currObj["client_country"]->toLower() . ".png", $this->currObj["client_country"], null, FALSE, TRUE);
}
else
{
return "<img src='/images/flags/none.png' alt='NOFLAG' title='NOFLAG' />";
}
}
Thanks a bunch! much appreciated
Last edited by R3M__; 02-02-2011 at 12:44.
-
01-02-2011, 19:36 #208
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,298
I can. Unfortunately, the code changes you've made have nothing to do with the warning message. The issue is caused by a PHP bug when you're using exceptions inside uasort() callbacks like I did.
Anyway, the upcoming version 1.1.4-beta should fix this.

What I don't understand is why there's an exception thrown on your end. Which version of the TeamSpeak 3 Server do you use? Maybe this is a compatibility issue.Last edited by ScP; 01-02-2011 at 20:29. Reason: typo-a-lot
-
05-02-2011, 07:06 #209
-= TeamSpeak Lover =-
- Join Date
- Dec 2009
- Location
- Flroida
- Posts
- 62
I would like to know if there is an easy way to turn a client db id into a regular client id. As it stands I have to request the cluid, then from their request the client info on the cluid. explore the array to find the clid before finally ouputting to a kick functions.
The reason I ask this is I have it so that once an hour my script checks for certain conditions. If these conditions fail for a user I clientDeleteDb them, this only works however if they are not logged in. So I then have to go through proccess above to kick before I can clientDeleteDb.
-
05-02-2011, 22:03 #210
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,298
new release
Version 1.1.4-beta is available now...
Code:=== Release 1.1.4-beta - 05 Feb 2011 === ! codebase converted to Zend Studio 8.0.0 project ! upgrading your servers to 3.0.0-beta31 (build >= 13537) is mandatory + added TeamSpeak3_Node_Server::clientGetNameByUid() + added TeamSpeak3_Node_Server::clientGetNameByDbid() + added TeamSpeak3_Node_Server::clientGetServerGroupsByDbid() + added TeamSpeak3_Node_Server::permRemoveAny() - fixed internal convert error exception caused internally when using integer values with more than 16 bits for clientftfid parameters * several iconDownload() and iconUpload() methods now use random clientftfid parameter values instead of node IDs - fixed bug where using exceptions inside uasort() callbacks caused warnings * TeamSpeak3_Adapter_ServerQuery_Reply::fetchError() now tries to resolve the permission name for failed_permid values to generate comprehensible error messages
Thread Information
Users Browsing this Thread
There are currently 3 users browsing this thread. (0 members and 3 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
