ts3admin.class  1.0.2.5
The ts3admin.class is a powerful api for communication with Teamspeak 3 Servers from your website! Your creativity knows no bounds!
Public Member Functions | Data Fields
ts3admin Class Reference

The ts3admin.class. More...

Public Member Functions

 __call ($name, $args)
 
 __construct ($host, $queryport, $timeout=2)
 
 __destruct ()
 
 banAddByIp ($ip, $time=0, $banreason=NULL)
 
 banAddByName ($name, $time=0, $banreason=NULL)
 
 banAddByUid ($uid, $time=0, $banreason=NULL)
 
 banClient ($clid, $time=0, $banreason=NULL)
 
 banDelete ($banID)
 
 banDeleteAll ()
 
 banList ()
 
 bindingList ($subsystem=0)
 
 channelAddPerm ($cid, $permissions)
 
 channelClientAddPerm ($cid, $cldbid, $permissions)
 
 channelClientDelPerm ($cid, $cldbid, $permissions)
 
 channelClientList ($cid, $params=null)
 
 channelClientPermList ($cid, $cldbid, $permsid=false)
 
 channelCreate ($data)
 
 channelDelete ($cid, $force=1)
 
 channelDelPerm ($cid, $permissions)
 
 channelEdit ($cid, $data)
 
 channelFind ($pattern)
 
 channelGetIconByChannelID ($channelID)
 
 channelGroupAdd ($name, $type=1)
 
 channelGroupAddClient ($cgid, $cid, $cldbid)
 
 channelGroupAddPerm ($cgid, $permissions)
 
 channelGroupClientList ($cid=NULL, $cldbid=NULL, $cgid=NULL)
 
 channelGroupCopy ($scgid, $tcgid, $name, $type=1)
 
 channelGroupDelete ($cgid, $force=1)
 
 channelGroupDelPerm ($cgid, $permissions)
 
 channelGroupGetIconByCGID ($channelGroupID)
 
 channelGroupList ()
 
 channelGroupPermList ($cgid, $permsid=false)
 
 channelGroupRename ($cgid, $name)
 
 channelInfo ($cid)
 
 channelList ($params=null)
 
 channelMove ($cid, $cpid, $order=null)
 
 channelPermList ($cid, $permsid=false)
 
 clientAddPerm ($cldbid, $permissions)
 
 clientAvatar ($uid)
 
 clientDbDelete ($cldbid)
 
 clientDbEdit ($cldbid, $data)
 
 clientDbFind ($pattern, $uid=false)
 
 clientDbInfo ($cldbid)
 
 clientDbList ($start=0, $duration=-1, $count=false)
 
 clientDelPerm ($cldbid, $permissionIds)
 
 clientEdit ($clid, $data)
 
 clientFind ($pattern)
 
 clientGetDbIdFromUid ($cluid)
 
 clientGetIds ($cluid)
 
 clientGetNameFromDbid ($cldbid)
 
 clientGetNameFromUid ($cluid)
 
 clientInfo ($clid)
 
 clientKick ($clid, $kickMode="server", $kickmsg="")
 
 clientList ($params=null)
 
 clientMove ($clid, $cid, $cpw=null)
 
 clientPermList ($cldbid, $permsid=false)
 
 clientPoke ($clid, $msg)
 
 clientSetServerQueryLogin ($username)
 
 clientUpdate ($data)
 
 complainAdd ($tcldbid, $msg)
 
 complainDelete ($tcldbid, $fcldbid)
 
 complainDeleteAll ($tcldbid)
 
 complainList ($tcldbid=null)
 
 connect ()
 
 convertSecondsToArrayTime ($seconds)
 
 convertSecondsToStrTime ($seconds)
 
 customDelete ($cldbid, $ident)
 
 customInfo ($cldbid)
 
 customSearch ($ident, $pattern)
 
 customSet ($cldbid, $ident, $value)
 
 execOwnCommand ($mode, $command)
 
 ftCreateDir ($cid, $cpw=null, $dirname)
 
 ftDeleteFile ($cid, $cpw='', $files)
 
 ftDownloadFile ($data)
 
 ftGetFileInfo ($cid, $cpw='', $file)
 
 ftGetFileList ($cid, $cpw='', $path)
 
 ftInitDownload ($name, $cid, $cpw='', $seekpos=0, $proto=null)
 
 ftInitUpload ($filename, $cid, $size, $cpw='', $overwrite=false, $resume=false, $proto=null)
 
 ftList ()
 
 ftRenameFile ($cid, $cpw=null, $oldname, $newname, $tcid=null, $tcpw=null)
 
 ftStop ($serverftfid, $delete=true)
 
 ftUploadFile ($data, $uploadData)
 
 getDebugLog ()
 
 getElement ($element, $array)
 
 getIconByID ($iconID)
 
 getQueryClid ()
 
 gm ($msg)
 
 hostInfo ()
 
 instanceEdit ($data)
 
 instanceInfo ()
 
 logAdd ($logLevel, $logMsg)
 
 login ($username, $password)
 
 logout ()
 
 logView ($lines, $reverse=0, $instance=0, $begin_pos=0)
 
 messageAdd ($cluid, $subject, $message)
 
 messageDelete ($messageID)
 
 messageGet ($messageID)
 
 messageList ()
 
 messageUpdateFlag ($messageID, $flag=1)
 
 permFind ($perm)
 
 permGet ($perm)
 
 permIdGetByName ($permsids)
 
 permissionList ($new=false)
 
 permOverview ($cid, $cldbid, $permid='0', $permsid=false)
 
 permReset ()
 
 privilegekeyAdd ($tokentype, $tokenid1, $tokenid2, $description='', $customFieldSet=array())
 
 privilegekeyDelete ($token)
 
 privilegekeyList ()
 
 privilegekeyUse ($token)
 
 readChatMessage ($type='textchannel', $keepalive=false, $cid=-1)
 
 selectServer ($value, $type='port', $virtual =false)
 
 sendMessage ($mode, $target, $msg)
 
 serverCreate ($data=array())
 
 serverDelete ($sid)
 
 serverEdit ($data)
 
 serverGroupAdd ($name, $type=1)
 
 serverGroupAddClient ($sgid, $cldbid)
 
 serverGroupAddPerm ($sgid, $permissions)
 
 serverGroupAutoAddPerm ($sgtype, $permissions)
 
 serverGroupAutoDeletePerm ($sgtype, $permissions)
 
 serverGroupClientList ($sgid, $names=false)
 
 serverGroupCopy ($ssgid, $tsgid, $name, $type=1)
 
 serverGroupDelete ($sgid, $force=1)
 
 serverGroupDeleteClient ($sgid, $cldbid)
 
 serverGroupDeletePerm ($sgid, $permissionIds)
 
 serverGroupGetIconBySGID ($serverGroupID)
 
 serverGroupList ($type=null)
 
 serverGroupPermList ($sgid, $permsid=false)
 
 serverGroupRename ($sgid, $name)
 
 serverGroupsByClientID ($cldbid)
 
 serverIdGetByPort ($port)
 
 serverInfo ()
 
 serverList ($options=NULL)
 
 serverNotifyUnregister ()
 
 serverProcessStop ($reasonMessage=null)
 
 serverRequestConnectionInfo ()
 
 serverSnapshotCreate ()
 
 serverSnapshotDeploy ($snapshot, $mapping=false)
 
 serverStart ($sid)
 
 serverStop ($sid, $reasonMessage=null)
 
 serverTempPasswordAdd ($pw, $duration, $desc='none', $tcid=0, $tcpw=null)
 
 serverTempPasswordDel ($pw)
 
 serverTempPasswordList ()
 
 setClientChannelGroup ($cgid, $cid, $cldbid)
 
 setName ($newName)
 
 succeeded ($array)
 
 tokenAdd ($tokentype, $tokenid1, $tokenid2, $description='', $customFieldSet=array())
 
 tokenDelete ($token)
 
 tokenList ()
 
 tokenUse ($token)
 
 uploadIcon ($filepath, $iconID=-1)
 
 version ()
 
 whoAmI ()
 

Data Fields

const CODEC_CELT_MONO = 3
 
const CODEC_CRYPT_DISABLED = 1
 
const CODEC_CRYPT_ENABLED = 2
 
const CODEC_CRYPT_INDIVIDUAL = 0
 
const CODEC_OPUS_MUSIC = 5
 
const CODEC_OPUS_VOICE = 4
 
const CODEC_SPEEX_NARROWBAND = 0
 
const CODEC_SPEEX_ULTRAWIDEBAND = 2
 
const CODEC_SPEEX_WIDEBAND = 1
 
const HostBannerMode_IGNOREASPECT = 1
 
const HostBannerMode_KEEPASPECT = 2
 
const HostBannerMode_NOADJUST = 0
 
const HostMessageMode_LOG = 1
 
const HostMessageMode_MODAL = 2
 
const HostMessageMode_MODALQUIT = 3
 
const HostMessageMode_NONE = 0
 
const LogLevel_DEBUG = 3
 
const LogLevel_ERROR = 1
 
const LogLevel_INFO = 4
 
const LogLevel_WARNING = 2
 
const PermGroupDBTypeQuery = 2
 
const PermGroupDBTypeRegular = 1
 
const PermGroupDBTypeTemplate = 0
 
const PermGroupTypeChannel = 2
 
const PermGroupTypeChannelClient = 4
 
const PermGroupTypeChannelGroup = 3
 
const PermGroupTypeGlobalClient = 1
 
const PermGroupTypeServerGroup = 0
 
const REASON_KICK_CHANNEL = 4
 
const REASON_KICK_SERVER = 5
 
const TextMessageTarget_CHANNEL = 2
 
const TextMessageTarget_CLIENT = 1
 
const TextMessageTarget_SERVER = 3
 
const TokenChannelGroup = 1
 
const TokenServerGroup = 0
 

Detailed Description

The ts3admin.class.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $host,
  $queryport,
  $timeout = 2 
)

__construct

Note: When specifying a numerical IPv6 address (e.g. fe80::1), you must enclose the IP in square brackets—for example, [fe80::1]

Author
Stefan Zehnpfennig
Parameters
string$hostts3host
integer$queryportts3queryport
integer$timeoutsocket timeout (default = 2) [optional]
Returns
void

◆ __destruct()

__destruct ( )

__destruct

Author
Stefan Zehnpfennig
Returns
void

Member Function Documentation

◆ __call()

__call (   $name,
  $args 
)

__call

prevents your website from php errors if you want to execute a method which doesn't exists

Author
Stefan Zehnpfennig
Parameters
string$namemethod name
array$argsmethod arguments
Returns
array

◆ banAddByIp()

banAddByIp (   $ip,
  $time = 0,
  $banreason = NULL 
)

banAddByIp

Adds a new ban rule on the selected virtual server.

Output:

Array
{
 [banid] => 109
}
Author
Stefan Zehnpfennig
Parameters
string$ipclientIp
integer$timebantime in seconds (0=unlimited/default) [optional]
string$banreasonBanreason [optional]
Returns
array banId

◆ banAddByName()

banAddByName (   $name,
  $time = 0,
  $banreason = NULL 
)

banAddByName

Adds a new ban rule on the selected virtual server.

Output:

Array
{
 [banid] => 111
}
Author
Stefan Zehnpfennig
Parameters
string$nameclientName
integer$timebantime in seconds (0=unlimited/default) [optional]
string$banreasonBanreason [optional]
Returns
array banId

◆ banAddByUid()

banAddByUid (   $uid,
  $time = 0,
  $banreason = NULL 
)

banAddByUid

Adds a new ban rule on the selected virtual server.

Output:

Array
{
 [banid] => 110
}
Author
Stefan Zehnpfennig
Parameters
string$uidclientUniqueId
integer$timebantime in seconds (0=unlimited/default) [optional]
string$banreasonBanreason [optional]
Returns
array banId

◆ banClient()

banClient (   $clid,
  $time = 0,
  $banreason = NULL 
)

banClient

Bans the client specified with ID clid from the server. Please note that this will create two separate ban rules for the targeted clients IP address and his unique identifier.

Output:

Array
{
 [1] => 129
 [2] => 130
}
Author
Stefan Zehnpfennig
Parameters
integer$clidclientId
integer$timebantime in seconds (0=unlimited/default) [optional]
string$banreasonBanreason [optional]
Returns
array banIds

◆ banDelete()

banDelete (   $banID)

banDelete

Deletes the ban rule with ID banid from the server.

Author
Stefan Zehnpfennig
Parameters
integer$banIDbanID
Returns
array success

◆ banDeleteAll()

banDeleteAll ( )

banDeleteAll

Deletes all active ban rules from the server.

Author
Stefan Zehnpfennig
Returns
array success

◆ banList()

banList ( )

banList

Displays a list of active bans on the selected virtual server.

Note: If [name] is always empty use [lastnickname]

Output:

Array
{
 [banid] => 131
 [ip] => 1.2.3.4
 [name] => eugen
 [uid] => IYAntAcZHgVC7s3n3DNWmuJB/aM=
 [created] => 1286660391
 [duration] => 0
 [invokername] => Par0noid
 [invokercldbid] => 2086
 [invokeruid] => nUixbsq/XakrrmbqU8O30R/D8Gc=
 [reason] => insult
 [enforcements] => 0
 [lastnickname] => eugen
}
Author
Stefan Zehnpfennig
Returns
array banlist

◆ bindingList()

bindingList (   $subsystem = 0)

bindingList

Displays a list of IP addresses used by the server instance on multi-homed machines.

Output:

Array
{
 [ip] => 0.0.0.0
}
Author
Stefan Zehnpfennig
Parameters
integer$subsystem(1: voice, 2: query, 3: filetransfer)
Returns
array bindingList

◆ channelAddPerm()

channelAddPerm (   $cid,
  $permissions 
)

channelAddPerm

Adds a set of specified permissions to a channel. Multiple permissions can be added by providing the two parameters of each permission. A permission can be specified by permid or permsid.

Input-Array like this:

$permissions = array();
$permissions['permissionID'] = 'permissionValue';
//or you could use Permission Name
$permissions['permissionName'] = 'permissionValue';
Author
Stefan Zehnpfennig
Parameters
integer$cidchannelId
array$permissionspermissions
Returns
array success

◆ channelClientAddPerm()

channelClientAddPerm (   $cid,
  $cldbid,
  $permissions 
)

channelClientAddPerm

Adds a set of specified permissions to a client in a specific channel. Multiple permissions can be added by providing the three parameters of each permission. A permission can be specified by permid or permsid.

Input-Array like this:

$permissions = array();
$permissions['permissionID'] = 'permissionValue';
//or you could use Permission Name
$permissions['permissionName'] = 'permissionValue';
Author
Stefan Zehnpfennig
Parameters
integer$cidchannelID
integer$cldbidclientDBID
array$permissionspermissions
Returns
array success

◆ channelClientDelPerm()

channelClientDelPerm (   $cid,
  $cldbid,
  $permissions 
)

channelClientDelPerm

Removes a set of specified permissions from a client in a specific channel. Multiple permissions can be removed at once. A permission can be specified by permid or permsid.

Input-Array like this:

$permissions = array();
$permissions[] = 'permissionID';
$permissions[] = 'permissionName';
//or
$permissions = array('permissionID', 'permissionName', 'permissionID');
Author
Stefan Zehnpfennig
Parameters
integer$cidchannelID
integer$cldbidclientDBID
array$permissionspermissions
Returns
array success

◆ channelClientList()

channelClientList (   $cid,
  $params = null 
)

channelClientList

Displays a list of clients online on a virtual server in a specific channel including their ID, nickname, status flags, etc. The output can be modified using several command options. Please note that the output will only contain clients which are currently in channels you're able to subscribe to.

Possible params: [-uid] [-away] [-voice] [-times] [-groups] [-info] [-icon] [-country] [-ip] [-badges]

Output:

Array
{
 [clid] => 1
 [cid] => 3
 [client_database_id] => 2
 [client_nickname] => Par0noid
 [client_type] => 0
 [-uid] => [client_unique_identifier] => nUixbsq/XakrrmbqU8O30R/D8Gc=
 [-away] => [client_away] => 0
 [-away] => [client_away_message] => 
 [-voice] => [client_flag_talking] => 0
 [-voice] => [client_input_muted] => 0
 [-voice] => [client_output_muted] => 0
 [-voice] => [client_input_hardware] => 0
 [-voice] => [client_output_hardware] => 0
 [-voice] => [client_talk_power] => 0
 [-voice] => [client_is_talker] => 0
 [-voice] => [client_is_priority_speaker] => 0
 [-voice] => [client_is_recording] => 0
 [-voice] => [client_is_channel_commander] => 0
 [-times] => [client_idle_time] => 1714
 [-times] => [client_created] => 1361027850
 [-times] => [client_lastconnected] => 1361042955
 [-groups] => [client_servergroups] => 6,7
 [-groups] => [client_channel_group_id] => 8
 [-groups] => [client_channel_group_inherited_channel_id] => 1
 [-info] => [client_version] => 3.0.9.2 [Build: 1351504843]
 [-info] => [client_platform] => Windows
 [-icon] => [client_icon_id] => 0
 [-country] => [client_country] => 
 [-ip] => [connection_client_ip] => 127.0.0.1
 [-badges] => [client_badges] => Overwolf=0
}
Usage:
$ts3->channelClientList(3); //No parameters
$ts3->channelClientList(3, "-uid"); //Single parameter
$ts3->channelClientList(3, "-uid -away -voice -times -groups -info -country -icon -ip -badges"); //Multiple parameters
Author
Stefan Zehnpfennig
Parameters
string$cidchannelID
string$paramsadditional parameters [optional]
Returns
array clientList

◆ channelClientPermList()

channelClientPermList (   $cid,
  $cldbid,
  $permsid = false 
)

channelClientPermList

Displays a list of permissions defined for a client in a specific channel.

Output:

Array
{
 [cid] => 250 (only in first result)
 [cldbid] => 2086 (only in first result)
 [permid] => 12876 (if permsid = false)
 [permsid] => b_client_info_view (if permsid = true)
 [permvalue] => 1
 [permnegated] => 0
 [permskip] => 0
}
Author
Stefan Zehnpfennig
Parameters
integer$cidchannelID
integer$cldbidclientDBID
boolean$permsiddisplays permissionName instead of permissionID
Returns
array channelclientpermlist

◆ channelCreate()

channelCreate (   $data)

channelCreate

Creates a new channel using the given properties and displays its ID. Note that this command accepts multiple properties which means that you're able to specifiy all settings of the new channel at once.

Hint: don't forget to set channel_flag_semi_permanent = 1 or channel_flag_permanent = 1

Hint: you'll get an error if you want to create a channel without channel_name

Hint: to set the parent channel you've to use cpid instead of pid

Input-Array like this:

$data = array();
$data['setting'] = 'value';
$data['setting'] = 'value';

Output:

Array
{
 [cid] => 257
}

Possible properties: CHANNEL_NAME, CHANNEL_TOPIC, CHANNEL_DESCRIPTION, CHANNEL_PASSWORD, CHANNEL_CODEC, CHANNEL_CODEC_QUALITY, CHANNEL_MAXCLIENTS, CHANNEL_MAXFAMILYCLIENTS, CHANNEL_ORDER, CHANNEL_FLAG_PERMANENT, CHANNEL_FLAG_SEMI_PERMANENT, CHANNEL_FLAG_TEMPORARY, CHANNEL_FLAG_DEFAULT, CHANNEL_FLAG_MAXCLIENTS_UNLIMITED, CHANNEL_FLAG_MAXFAMILYCLIENTS_UNLIMITED, CHANNEL_FLAG_MAXFAMILYCLIENTS_INHERITED, CHANNEL_NEEDED_TALK_POWER, CHANNEL_NAME_PHONETIC, CHANNEL_ICON_ID, CHANNEL_CODEC_IS_UNENCRYPTED, CPID

Author
Stefan Zehnpfennig
Parameters
array$dataproperties
Returns
array channelInfo

◆ channelDelete()

channelDelete (   $cid,
  $force = 1 
)

channelDelete

Deletes an existing channel by ID. If force is set to 1, the channel will be deleted even if there are clients within. The clients will be kicked to the default channel with an appropriate reason message.

Author
Stefan Zehnpfennig
Parameters
integer$cidchannelID
integer$force{1|0} (default: 1)
Returns
array success

◆ channelDelPerm()

channelDelPerm (   $cid,
  $permissions 
)

channelDelPerm

Removes a set of specified permissions from a channel. Multiple permissions can be removed at once. A permission can be specified by permid or permsid.

Input-Array like this:

$permissions = array();
$permissions[] = 'permissionID';
//or you could use
$permissions[] = 'permissionName';
Author
Stefan Zehnpfennig
Parameters
integer$cidchannelID
array$permissionspermissions
Returns
array success

◆ channelEdit()

channelEdit (   $cid,
  $data 
)

channelEdit

Changes a channels configuration using given properties. Note that this command accepts multiple properties which means that you're able to change all settings of the channel specified with cid at once.

Input-Array like this:

$data = array();
$data['setting'] = 'value';
$data['setting'] = 'value';

Possible properties: Take a look at channelCreate function

Author
Stefan Zehnpfennig
Parameters
integer$cid$channelID
array$dataedited settings
Returns
array success

◆ channelFind()

channelFind (   $pattern)

channelFind

displays a list of channels matching a given name pattern.

Output:

Array
{
 [cid] => 2
 [channel_name] => Lobby
}
Author
Stefan Zehnpfennig
Parameters
string$patternchannelName
Returns
array channelList

◆ channelGetIconByChannelID()

channelGetIconByChannelID (   $channelID)

channelGetIconByChannelID

Will return the base64 encoded binary of the channelIcon

$result = $tsAdmin->channelGetIconByChannelID($channelID);
You can display it like: echo '<img src="data:image/png;base64,'.$result["data"].'" />';
Author
Stefan Zehnpfennig
Parameters
string$channelIDchannelID
Returns
array base64 image

◆ channelGroupAdd()

channelGroupAdd (   $name,
  $type = 1 
)

channelGroupAdd

Creates a new channel group using a given name and displays its ID. The optional type parameter can be used to create ServerQuery groups and template groups.

groupDbTypes:

  1. template group (used for new virtual servers)
  2. regular group (used for regular clients)
  3. global query group (used for ServerQuery clients)

Output:

Array
{
 [cgid] => 86
}
Author
Stefan Zehnpfennig
Parameters
integer$namegroupName
integer$typegroupDbType [optional] (default: 1)
Returns
array success

◆ channelGroupAddClient()

channelGroupAddClient (   $cgid,
  $cid,
  $cldbid 
)

channelGroupAddClient

Sets the channel group of a client to the ID specified with cgid.

Author
Stefan Zehnpfennig
Parameters
integer$cgidgroupID
integer$cidchannelID
integer$cldbidclientDBID
Returns
array success

◆ channelGroupAddPerm()

channelGroupAddPerm (   $cgid,
  $permissions 
)

channelGroupAddPerm

Adds a set of specified permissions to a channel group. Multiple permissions can be added by providing the two parameters of each permission. A permission can be specified by permid or permsid.

Input-Array like this:

$permissions = array();
$permissions['permissionID'] = 'permissionValue';
//or you could use:
$permissions['permissionName'] = 'permissionValue';
Author
Stefan Zehnpfennig
Parameters
integer$cgidchannelGroupID
array$permissionspermissions
Returns
array success

◆ channelGroupClientList()

channelGroupClientList (   $cid = NULL,
  $cldbid = NULL,
  $cgid = NULL 
)

channelGroupClientList

Displays all the client and/or channel IDs currently assigned to channel groups. All three parameters are optional so you're free to choose the most suitable combination for your requirement

Output:

Array
{
 [cid] => 2
 [cldbid] => 9
 [cgid] => 9
}
Author
Stefan Zehnpfennig
Parameters
integer$cidchannelID [optional]
integer$cldbidclientDBID [optional]
integer$cgidchannelGroupID [optional]
Returns
array channelGroupClientList

◆ channelGroupCopy()

channelGroupCopy (   $scgid,
  $tcgid,
  $name,
  $type = 1 
)

channelGroupCopy

Creates a copy of the channel group specified with scgid. If tcgid is set to 0, the server will create a new group. To overwrite an existing group, simply set tcgid to the ID of a designated target group. If a target group is set, the name parameter will be ignored. The type parameter can be used to create ServerQuery groups and template groups.

groupDbTypes:

  1. template group (used for new virtual servers)
  2. regular group (used for regular clients)
  3. global query group (used for ServerQuery clients)

Output:

Array
{
 [cgid] => 86
}
Author
Stefan Zehnpfennig
Parameters
integer$scgidsourceChannelGroupID
integer$tcgidtargetChannelGroupID
integer$namegroupName
integer$typegroupDbType
Returns
array groupId

◆ channelGroupDelete()

channelGroupDelete (   $cgid,
  $force = 1 
)

channelGroupDelete

Deletes a channel group by ID. If force is set to 1, the channel group will be deleted even if there are clients within.

Author
Stefan Zehnpfennig
Parameters
integer$cgidchannelGroupID
integer$forceforces deleting channelGroup (default: 1)
Returns
array success

◆ channelGroupDelPerm()

channelGroupDelPerm (   $cgid,
  $permissions 
)

channelGroupDelPerm

Removes a set of specified permissions from the channel group. Multiple permissions can be removed at once. A permission can be specified by permid or permsid.

Input-Array like this:

$permissions = array();
$permissions[] = 'permissionID';
$permissions[] = 'permissionName';
Author
Stefan Zehnpfennig
Parameters
integer$cgidchannelGroupID
array$permissionspermissions
Returns
array success

◆ channelGroupGetIconByCGID()

channelGroupGetIconByCGID (   $channelGroupID)

channelGroupGetIconByCGID

Will return the base64 encoded binary of the channelGroupIcon

$result = $tsAdmin->channelGroupGetIconByCGID($channelGroupID);
You can display it like: echo '<img src="data:image/png;base64,'.$result["data"].'" />';
Author
Stefan Zehnpfennig
Parameters
string$channelGroupIDchannelGroupID
Returns
array base64 image

◆ channelGroupList()

channelGroupList ( )

channelGroupList

Displays a list of channel groups available on the selected virtual server.

Output:

Array
{
 [cgid] => 3
 [name] => Testname
 [type] => 0
 [iconid] => 100
 [savedb] => 1
 [sortid] => 0
 [namemode] => 0
 [n_modifyp] => 75
 [n_member_addp] => 50
 [n_member_removep] => 50
}
Author
Stefan Zehnpfennig
Returns
array channelGroupList

◆ channelGroupPermList()

channelGroupPermList (   $cgid,
  $permsid = false 
)

channelGroupPermList

Displays a list of permissions assigned to the channel group specified with cgid. If the permsid option is specified, the output will contain the permission names instead of the internal IDs.

Output:

Array
{
 [permid] => 8471 (displayed if permsid is false)
 [permsid] => i_channel_create_modify_with_codec_latency_factor_min (displayed if permsid is true)
 [permvalue] => 1
 [permnegated] => 0
 [permskip] => 0
}
Author
Stefan Zehnpfennig
Parameters
integer$cgidchannelGroupID
boolean$permsidpermsid
Returns
array channelGroupPermlist

◆ channelGroupRename()

channelGroupRename (   $cgid,
  $name 
)

channelGroupRename

Changes the name of a specified channel group.

Author
Stefan Zehnpfennig
Parameters
integer$cgidgroupID
integer$namegroupName
Returns
array success

◆ channelInfo()

channelInfo (   $cid)

channelInfo

Displays detailed configuration information about a channel including ID, topic, description, etc.

Output:

Array
{
 [pid] => 0
 [channel_name] => Test
 [channel_topic] => 
 [channel_description] => 
 [channel_password] => cc97Pm4oOYq0J9fXDAgiWv/qScQ=
 [channel_codec] => 2
 [channel_codec_quality] => 7
 [channel_maxclients] => -1
 [channel_maxfamilyclients] => -1
 [channel_order] => 1
 [channel_flag_permanent] => 1
 [channel_flag_semi_permanent] => 0
 [channel_flag_default] => 0
 [channel_flag_password] => 0
 [channel_codec_latency_factor] => 1
 [channel_codec_is_unencrypted] => 1
 [channel_security_salt] => 
 [channel_delete_delay] => 0
 [channel_flag_maxclients_unlimited] => 1
 [channel_flag_maxfamilyclients_unlimited] => 0
 [channel_flag_maxfamilyclients_inherited] => 1
 [channel_filepath] => files\virtualserver_1\channel_2
 [channel_needed_talk_power] => 0
 [channel_forced_silence] => 0
 [channel_name_phonetic] => 
 [channel_icon_id] => 0
 [channel_flag_private] => 0
 [seconds_empty] => 61 (If it's a temporary channel with a channel delete delay)
}
Author
Stefan Zehnpfennig
Parameters
integer$cidchannelID
Returns
array channelInfo

◆ channelList()

channelList (   $params = null)

channelList

Displays a list of channels created on a virtual server including their ID, order, name, etc. The output can be modified using several command options.

Possible parameters: [-topic] [-flags] [-voice] [-limits] [-icon] [-secondsempty]

Output: (without parameters)

Array
{
 [cid] => 2
 [pid] => 0
 [channel_order] => 1
 [channel_name] => Test
 [total_clients] => 0
 [channel_needed_subscribe_power] => 0
}

Output: (from parameters)

Array
{
 [-topic] => [channel_topic] => Default Channel has no topic
 [-flags] => [channel_flag_default] => 1
 [-flags] => [channel_flag_password] => 0
 [-flags] => [channel_flag_permanent] => 1
 [-flags] => [channel_flag_semi_permanent] => 0
 [-voice] => [channel_codec] => 2
 [-voice] => [channel_codec_quality] => 7
 [-voice] => [channel_needed_talk_power] => 0
 [-limits] => [total_clients_family] => 1
 [-limits] => [channel_maxclients] => -1
 [-limits] => [channel_maxfamilyclients] => -1
 [-icon] => [channel_icon_id] => 0
 [-seconds_empty] => [seconds_empty] => -1
}

Usage:

$ts3->channelList(); //No parameters
$ts3->channelList("-flags"); //Single parameter
$ts3->channelList("-topic -flags -voice -limits -icon"); //Multiple parameters / all
Author
Stefan Zehnpfennig
Parameters
string$paramsadditional parameters [optional]
Returns
array channelList

◆ channelMove()

channelMove (   $cid,
  $cpid,
  $order = null 
)

channelMove

Moves a channel to a new parent channel with the ID cpid. If order is specified, the channel will be sorted right under the channel with the specified ID. If order is set to 0, the channel will be sorted right below the new parent.

Author
Stefan Zehnpfennig
Parameters
integer$cidchannelID
integer$cpidchannelParentID
integer$orderchannelSortOrder
Returns
array success

◆ channelPermList()

channelPermList (   $cid,
  $permsid = false 
)

channelPermList

Displays a list of permissions defined for a channel.

Output:

Array
{
 [cid] => 2 (only in first result)
 [permid] => 8471 (if permsid = false)
 [permsid] => i_channel_needed_delete_power (if permsid = true)
 [permvalue] => 1
 [permnegated] => 0
 [permskip] => 0
}
Author
Stefan Zehnpfennig
Parameters
integer$cidchannelID
boolean$permsiddisplays permissionName instead of permissionID [optional]
Returns
array channelpermlist

◆ clientAddPerm()

clientAddPerm (   $cldbid,
  $permissions 
)

clientAddPerm

Adds a set of specified permissions to a client. Multiple permissions can be added by providing the three parameters of each permission. A permission can be specified by permid or permsid.

Input-Array like this:

$permissions = array();
$permissions['permissionID'] = array('permissionValue', 'permskip');
//or you could use Permission Name
$permissions['permissionName'] = array('permissionValue', 'permskip');
Author
Stefan Zehnpfennig
Parameters
integer$cldbidclientDBID
array$permissionspermissions
Returns
array success

◆ clientAvatar()

clientAvatar (   $uid)

clientAvatar

Will return the base64 encoded binary of the clients avatar

$result = $tsAdmin->clientAvatar($uid);
You can display it like: echo '<img src="data:image/png;base64,'.$result["data"].'" />';
Author
Stefan Zehnpfennig
Parameters
string$uidclientUID
Returns
array base64 image

◆ clientDbDelete()

clientDbDelete (   $cldbid)

clientDbDelete

Deletes a clients properties from the database.

Author
Stefan Zehnpfennig
Parameters
integer$cldbidclientDBID
Returns
array success

◆ clientDbEdit()

clientDbEdit (   $cldbid,
  $data 
)

clientDbEdit

Changes a clients settings using given properties.

Input-Array like this:

$data = array();
$data['property'] = 'value';
$data['property'] = 'value';
Author
Stefan Zehnpfennig
Parameters
integer$cldbidclientDBID
array$dataclientProperties
Returns
array success

◆ clientDbFind()

clientDbFind (   $pattern,
  $uid = false 
)

clientDbFind

Displays a list of client database IDs matching a given pattern. You can either search for a clients last known nickname or his unique identity by using the -uid option.

Output:

Array
{
 [cldbid] => 2
}
Author
Stefan Zehnpfennig
Parameters
string$patternclientName
boolean$uidset true to add -uid param [optional]
Returns
array clientList

◆ clientDbInfo()

clientDbInfo (   $cldbid)

clientDbInfo

Displays detailed database information about a client including unique ID, creation date, etc.

Output:

Array
{
 [client_unique_identifier] => nUixbsq/XakrrmbqU8O30R/D8Gc=
 [client_nickname] => par0noid
 [client_database_id] => 2
 [client_created] => 1361027850
 [client_lastconnected] => 1361027850
 [client_totalconnections] => 1
 [client_flag_avatar] => 
 [client_description] => 
 [client_month_bytes_uploaded] => 0
 [client_month_bytes_downloaded] => 0
 [client_total_bytes_uploaded] => 0
 [client_total_bytes_downloaded] => 0
 [client_base64HashClientUID] => jneilbgomklpfnkjclkoggokfdmdlhnbbpmdpagh
 [client_lastip] => 127.0.0.1
}
Author
Stefan Zehnpfennig
Parameters
integer$cldbidclientDBID
Returns
array clientDbInfo

◆ clientDbList()

clientDbList (   $start = 0,
  $duration = -1,
  $count = false 
)

clientDbList

Displays a list of client identities known by the server including their database ID, last nickname, etc.

Possible params: [start={offset}] [duration={limit}] [-count]

Output:

Array
{
 [count] => 1 (if count parameter is set)
 [cldbid] => 2
 [client_unique_identifier] => nUixbsq/XakrrmbqU8O30R/D8Gc=
 [client_nickname] => par0noid
 [client_created] => 1361027850
 [client_lastconnected] => 1361027850
 [client_totalconnections] => 1
 [client_description] => 
 [client_lastip] => 127.0.0.1
}
Author
Stefan Zehnpfennig
Parameters
integer$startoffset [optional] (Default: 0)
integer$durationlimit [optional] (Default: -1)
boolean$countset true to add -count param [optional]
Returns
array clientdblist

◆ clientDelPerm()

clientDelPerm (   $cldbid,
  $permissionIds 
)

clientDelPerm

Removes a set of specified permissions from a client. Multiple permissions can be removed at once. A permission can be specified by permid or permsid.

Input-Array like this:

$permissions = array();
$permissions['permissionID'] = 'permissionValue';
//or you could use Permission Name
$permissions['permissionName'] = 'permissionValue';
Author
Stefan Zehnpfennig
Parameters
integer$cldbidclientDBID
array$permissionIdspermissionIDs
Returns
array success

◆ clientEdit()

clientEdit (   $clid,
  $data 
)

clientEdit

Changes a clients settings using given properties.

Input-Array like this:

$data = array();
$data['property'] = 'value';
$data['property'] = 'value';

Possible properties: CLIENT_IS_TALKER, CLIENT_DESCRIPTION, CLIENT_IS_CHANNEL_COMMANDER, CLIENT_ICON_ID

Author
Stefan Zehnpfennig
Parameters
integer$clidclientID
array$dataclientProperties
Returns
array success

◆ clientFind()

clientFind (   $pattern)

clientFind

Displays a list of clients matching a given name pattern.

Output:

Array
{
 [clid] => 18
 [client_nickname] => par0noid
}
Author
Stefan Zehnpfennig
Parameters
string$patternclientName
Returns
array clienList

◆ clientGetDbIdFromUid()

clientGetDbIdFromUid (   $cluid)

clientGetDbIdFromUid

Displays the database ID matching the unique identifier specified by cluid.

Output:

Array
{
 [cluid] => nUixbsq/XakrrmbqU8O30R/D8Gc=
 [cldbid] => 2
}
Author
Stefan Zehnpfennig
Parameters
string$cluidclientUID
Returns
array clientInfo

◆ clientGetIds()

clientGetIds (   $cluid)

clientGetIds

Displays all client IDs matching the unique identifier specified by cluid.

Output:

Array
{
 [cluid] => nUixbdf/XakrrmsdffO30R/D8Gc=
 [clid] => 7
 [name] => Par0noid
}
Author
Stefan Zehnpfennig
Parameters
string$cluidclientUID
Returns
array clientList

◆ clientGetNameFromDbid()

clientGetNameFromDbid (   $cldbid)

clientGetNameFromDbid

Displays the unique identifier and nickname matching the database ID specified by cldbid.

Output:

Array
{
 [cluid] => nUixbsq/XakrrmbqU8O30R/D8Gc=
 [cldbid] => 2
 [name] => Par0noid
}
Author
Stefan Zehnpfennig
Parameters
integer$cldbidclientDBID
Returns
array clientInfo

◆ clientGetNameFromUid()

clientGetNameFromUid (   $cluid)

clientGetNameFromUid

Displays the database ID and nickname matching the unique identifier specified by cluid.

Output:

Array
{
 [cluid] => nUixbsq/XakrrmbqU8O30R/D8Gc=
 [cldbid] => 2
 [name] => Par0noid
}
Author
Stefan Zehnpfennig
Parameters
string$cluidclientUID
Returns
array clientInfo

◆ clientInfo()

clientInfo (   $clid)

clientInfo

Displays detailed configuration information about a client including unique ID, nickname, client version, etc.

Output:

Array
{
 [cid] => 2
 [client_idle_time] => 4445369
 [client_unique_identifier] => nUixbsq/XakrrmbqU8O30R/D8Gc=
 [client_nickname] => par0noid
 [client_version] => 3.0.9.2 [Build: 1351504843]
 [client_platform] => Windows
 [client_input_muted] => 1
 [client_output_muted] => 1
 [client_outputonly_muted] => 0
 [client_input_hardware] => 1
 [client_output_hardware] => 1
 [client_default_channel] => 
 [client_meta_data] => 
 [client_is_recording] => 0
 [client_version_sign] => ldWL49uDKC3N9uxdgWRMTOzUabc1nBqUiOa+Nal5HvdxJiN4fsTnmmPo5tvglN7WqoVoFfuuKuYq1LzodtEtCg==
 [client_security_hash] => 
 [client_login_name] => 
 [client_database_id] => 2
 [client_channel_group_id] => 5
 [client_servergroups] => 6
 [client_created] => 1361027850
 [client_lastconnected] => 1361027850
 [client_totalconnections] => 1
 [client_away] => 0
 [client_away_message] => 
 [client_type] => 0
 [client_flag_avatar] => 
 [client_talk_power] => 75
 [client_talk_request] => 0
 [client_talk_request_msg] => 
 [client_description] => 
 [client_is_talker] => 0
 [client_month_bytes_uploaded] => 0
 [client_month_bytes_downloaded] => 0
 [client_total_bytes_uploaded] => 0
 [client_total_bytes_downloaded] => 0
 [client_is_priority_speaker] => 0
 [client_nickname_phonetic] => 
 [client_needed_serverquery_view_power] => 75
 [client_default_token] => 
 [client_icon_id] => 0
 [client_is_channel_commander] => 0
 [client_country] => 
 [client_channel_group_inherited_channel_id] => 2
 [client_badges] => Overwolf=0
 [client_myteamspeak_id] => 
 [client_base64HashClientUID] => jneilbgomklpfnkjclkoggokfdmdlhnbbpmdpagh
 [connection_filetransfer_bandwidth_sent] => 0
 [connection_filetransfer_bandwidth_received] => 0
 [connection_packets_sent_total] => 12130
 [connection_bytes_sent_total] => 542353
 [connection_packets_received_total] => 12681
 [connection_bytes_received_total] => 592935
 [connection_bandwidth_sent_last_second_total] => 82
 [connection_bandwidth_sent_last_minute_total] => 92
 [connection_bandwidth_received_last_second_total] => 84
 [connection_bandwidth_received_last_minute_total] => 88
 [connection_connected_time] => 5908749
 [connection_client_ip] => 127.0.0.1
} 
Author
Stefan Zehnpfennig
Parameters
integer$clidclientID
Returns
array clientInformation

◆ clientKick()

clientKick (   $clid,
  $kickMode = "server",
  $kickmsg = "" 
)

clientKick

Kicks one or more clients specified with clid from their currently joined channel or from the server, depending on reasonid. The reasonmsg parameter specifies a text message sent to the kicked clients. This parameter is optional and may only have a maximum of 40 characters.

Author
Stefan Zehnpfennig
Parameters
integer$clidclientID
string$kickModekickMode (server or channel) (Default: server)
string$kickmsgkick reason [optional]
Returns
array success

◆ clientList()

clientList (   $params = null)

clientList

Displays a list of clients online on a virtual server including their ID, nickname, status flags, etc. The output can be modified using several command options. Please note that the output will only contain clients which are currently in channels you're able to subscribe to.

Possible params: [-uid] [-away] [-voice] [-times] [-groups] [-info] [-icon] [-country] [-ip] [-badges]

Output:

Array
{
 [clid] => 1
 [cid] => 1
 [client_database_id] => 2
 [client_nickname] => Par0noid
 [client_type] => 0
 [-uid] => [client_unique_identifier] => nUixbsq/XakrrmbqU8O30R/D8Gc=
 [-away] => [client_away] => 0
 [-away] => [client_away_message] => 
 [-voice] => [client_flag_talking] => 0
 [-voice] => [client_input_muted] => 0
 [-voice] => [client_output_muted] => 0
 [-voice] => [client_input_hardware] => 0
 [-voice] => [client_output_hardware] => 0
 [-voice] => [client_talk_power] => 0
 [-voice] => [client_is_talker] => 0
 [-voice] => [client_is_priority_speaker] => 0
 [-voice] => [client_is_recording] => 0
 [-voice] => [client_is_channel_commander] => 0
 [-times] => [client_idle_time] => 1714
 [-times] => [client_created] => 1361027850
 [-times] => [client_lastconnected] => 1361042955
 [-groups] => [client_servergroups] => 6,7
 [-groups] => [client_channel_group_id] => 8
 [-groups] => [client_channel_group_inherited_channel_id] => 1
 [-info] => [client_version] => 3.0.9.2 [Build: 1351504843]
 [-info] => [client_platform] => Windows
 [-icon] => [client_icon_id] => 0
 [-country] => [client_country] => 
 [-ip] => [connection_client_ip] => 127.0.0.1
 [-badges] => [client_badges] => Overwolf=0
}
Usage:
$ts3->clientList(); //No parameters
$ts3->clientList("-uid"); //Single parameter
$ts3->clientList("-uid -away -voice -times -groups -info -country -icon -ip -badges"); //Multiple parameters
Author
Stefan Zehnpfennig
Parameters
string$paramsadditional parameters [optional]
Returns
array clientList

◆ clientMove()

clientMove (   $clid,
  $cid,
  $cpw = null 
)

clientMove

Moves one or more clients specified with clid to the channel with ID cid. If the target channel has a password, it needs to be specified with cpw. If the channel has no password, the parameter can be omitted.

Author
Stefan Zehnpfennig
Parameters
integer$clidclientID
integer$cidchannelID
string$cpwchannelPassword [optional]
Returns
array success

◆ clientPermList()

clientPermList (   $cldbid,
  $permsid = false 
)

clientPermList

Displays a list of permissions defined for a client.

Output:

Array
{
 [permid] => 20654 //with permsid = false
 [permsid] => b_client_ignore_bans //with permsid = true
 [permvalue] => 1
 [permnegated] => 0
 [permskip] => 0
}
Author
Stefan Zehnpfennig
Parameters
integer$cldbidclientDBID
boolean$permsidset true to add -permsid param [optional]
Returns
array clientPermList

◆ clientPoke()

clientPoke (   $clid,
  $msg 
)

clientPoke

Sends a poke message to the client specified with clid.

Author
Stefan Zehnpfennig
Parameters
integer$clidclientID
string$msgpokeMessage
Returns
array success

◆ clientSetServerQueryLogin()

clientSetServerQueryLogin (   $username)

clientSetServerQueryLogin

Updates your own ServerQuery login credentials using a specified username. The password will be auto-generated.

Output:

Array
{
 [client_login_password] => +r\/TQqvR
}
Author
Stefan Zehnpfennig
Parameters
string$usernameusername
Returns
array userInfomation

◆ clientUpdate()

clientUpdate (   $data)

clientUpdate

Change your ServerQuery clients settings using given properties.

Input-Array like this:

$data = array();
$data['property'] = 'value';
$data['property'] = 'value';
Author
Stefan Zehnpfennig
Parameters
array$dataclientProperties
Returns
array success

◆ complainAdd()

complainAdd (   $tcldbid,
  $msg 
)

complainAdd

Submits a complaint about the client with database ID tcldbid to the server.

Author
Stefan Zehnpfennig
Parameters
integer$tcldbidtargetClientDBID
string$msgcomplainMessage
Returns
array success

◆ complainDelete()

complainDelete (   $tcldbid,
  $fcldbid 
)

complainDelete

Deletes the complaint about the client with ID tcldbid submitted by the client with ID fcldbid from the server.

Author
Stefan Zehnpfennig
Parameters
integer$tcldbidtargetClientDBID
integer$fcldbidfromClientDBID
Returns
array success

◆ complainDeleteAll()

complainDeleteAll (   $tcldbid)

complainDeleteAll

Deletes all complaints about the client with database ID tcldbid from the server.

Author
Stefan Zehnpfennig
Parameters
integer$tcldbidtargetClientDBID
Returns
array success

◆ complainList()

complainList (   $tcldbid = null)

complainList

Displays a list of complaints on the selected virtual server. If tcldbid is specified, only complaints about the targeted client will be shown.

Output:

Array
{
 [tcldbid] => 2
 [tname] => par0noid
 [fcldbid] => 1
 [fname] => serveradmin from 127.0.0.1:6814
 [message] => Steals crayons
 [timestamp] => 1361044090
}
Author
Stefan Zehnpfennig
Parameters
string$tcldbidtargetClientDBID [optional]
Returns
array complainList

◆ connect()

connect ( )

connect

Connects to a ts3instance query port

Author
Stefan Zehnpfennig
Returns
array success

◆ convertSecondsToArrayTime()

convertSecondsToArrayTime (   $seconds)

convertSecondsToArrayTime

Converts seconds to a array: time

Output:

Array
{
 [days] => 3
 [hours] => 9
 [minutes] => 45
 [seconds] => 17
}
Author
Stefan Zehnpfennig
Parameters
integer$secondstime in seconds
Returns
array time

◆ convertSecondsToStrTime()

convertSecondsToStrTime (   $seconds)

convertSecondsToStrTime

Converts seconds to a strTime (bsp. 5d 1h 23m 19s)

Author
Stefan Zehnpfennig
Parameters
integer$secondstime in seconds
Returns
string strTime

◆ customDelete()

customDelete (   $cldbid,
  $ident 
)

customDelete

Removes a custom property from a client specified by the cldbid.

Author
Stefan Zehnpfennig
Parameters
string$cldbidclientDBID
string$identcustomIdent
Returns
boolean success

◆ customInfo()

customInfo (   $cldbid)

customInfo

Displays a list of custom properties for the client specified with cldbid.

Output:

Array
{
    [0] => Array
    {
        [cldbid] => 1
        [ident] => abc
        [value] => def
    }
    [1] => Array
    {
        [ident] => ghi
        [value] => jkl
    }
}
Author
Stefan Zehnpfennig
Parameters
string$cldbidclientDBID
Returns
array customInfos

◆ customSearch()

customSearch (   $ident,
  $pattern 
)

customSearch

Searches for custom client properties specified by ident and value. The value parameter can include regular characters and SQL wildcard characters (e.g. %).

Output: (ident=abc, pattern=%)

Array
{
    [0] => Array
    {
        [cldbid] => 1
        [ident] => abc
        [value] => def
    }
    [1] => Array
    {
        [cldbid] => 2
        [ident] => abc
        [value] => def
    }
}
Author
Stefan Zehnpfennig
Parameters
string$identcustomIdent
string$patternsearchpattern
Returns
array customSearchInfos

◆ customSet()

customSet (   $cldbid,
  $ident,
  $value 
)

customSet

Creates or updates a custom property for client specified by the cldbid. Ident and value can be any value, and are the key value pair of the custom property.

Author
Stefan Zehnpfennig
Parameters
string$cldbidclientDBID
string$identcustomIdent
string$valuecustomValue
Returns
boolean success

◆ execOwnCommand()

execOwnCommand (   $mode,
  $command 
)

execOwnCommand

executes a command that isn't defined in class and returns data like your propose

Modes:

  • 0: execute -> return boolean
  • 1: execute -> return normal array
  • 2: execute -> return multidimensional array
  • 3: execute -> return plaintext serverquery
Author
Stefan Zehnpfennig
Parameters
string$modeexecutionMode
string$commandcommand
Returns
mixed result

◆ ftCreateDir()

ftCreateDir (   $cid,
  $cpw = null,
  $dirname 
)

ftCreateDir

Creates new directory in a channels file repository.

Author
Stefan Zehnpfennig
Parameters
string$cidchannelId
string$cpwchannelPassword (leave blank if not needed)
string$dirnamedirPath
Returns
array success

◆ ftDeleteFile()

ftDeleteFile (   $cid,
  $cpw = '',
  $files 
)

ftDeleteFile

Deletes one or more files stored in a channels file repository.

Input-Array like this:

$files = array();
$files[] = '/pic1.jpg';
$files[] = '/dokumente/test.txt';
$files[] = '/dokumente';
Author
Stefan Zehnpfennig
Parameters
string$cidchannelID
string$cpwchannelPassword (leave blank if not needed)
array$filesfiles
Returns
array success

◆ ftDownloadFile()

ftDownloadFile (   $data)

ftDownloadFile

Ddownloads a file and returns its contents

Author
Stefan Zehnpfennig
Parameters
array$datareturn of ftInitDownload
Returns
array downloadedFile

◆ ftGetFileInfo()

ftGetFileInfo (   $cid,
  $cpw = '',
  $file 
)

ftGetFileInfo

Displays detailed information about one or more specified files stored in a channels file repository.

Output:

Array
{
 [cid] => 0
 [name] => /icon_1947482249
 [size] => 744
 [datetime] => 1286633633
}
Author
Stefan Zehnpfennig
Parameters
string$cidchannelID
string$cpwchannelPassword (leave blank if not needed)
string$filepath to file
Returns
array success

◆ ftGetFileList()

ftGetFileList (   $cid,
  $cpw = '',
  $path 
)

ftGetFileList

Displays a list of files and directories stored in the specified channels file repository.

Output:

Array
{
 [cid] => 231
 [path] => /
 [name] => Documents
 [size] => 0
 [datetime] => 1286633633
 [type] => 0
}
Author
Stefan Zehnpfennig
Parameters
string$cidchannelID
string$cpwchannelPassword (leave blank if not needed)
string$pathfilePath
Returns
array fileList

◆ ftInitDownload()

ftInitDownload (   $name,
  $cid,
  $cpw = '',
  $seekpos = 0,
  $proto = null 
)

ftInitDownload

Initializes a file transfer download. clientftfid is an arbitrary ID to identify the file transfer on client-side. On success, the server generates a new ftkey which is required to start downloading the file through TeamSpeak 3's file transfer interface. Since version 3.0.13 there is an optional proto parameter. The client can request a protocol version with it. Currently only 0 and 1 are supported which only differ in the way they handle some timings. The server will reply which protocol version it will support. The server will reply with an ip parameter if it determines the filetransfer subsystem is not reachable by the ip that is currently being used for the query connection.

Output:

Array
{
 [clientftfid] => 89
 [serverftfid] => 3
 [ftkey] => jSzWiRmFGdZnoJzW7BSDYJRUWB2WAUhb
 [port] => 30033
 [size] => 94
}
Author
Stefan Zehnpfennig
Parameters
string$namefilePath
string$cidchannelID
string$cpwchannelPassword (leave blank if not needed)
integer$seekposseekpos (default = 0) [optional]
integer$protoproto (default = NULL) [optional]
Returns
array initDownloadFileInfo

◆ ftInitUpload()

ftInitUpload (   $filename,
  $cid,
  $size,
  $cpw = '',
  $overwrite = false,
  $resume = false,
  $proto = null 
)

ftInitUpload

Initializes a file transfer upload. clientftfid is an arbitrary ID to identify the file transfer on client-side. On success, the server generates a new ftkey which is required to start uploading the file through TeamSpeak 3's file transfer interface. Since version 3.0.13 there is an optional proto parameter. The client can request a protocol version with it. Currently only 0 and 1 are supported which only differ in the way they handle some timings. The server will reply which protocol version it will support. The server will reply with an ip parameter if it determines the filetransfer subsystem is not reachable by the ip that is currently being used for the query connection

Output:

Array
{
 [clientftfid] => 84
 [serverftfid] => 41
 [ftkey] => HCnXpunOdAorqj3dGqfiuLszX18O0PHP
 [port] => 30033
 [seekpos] => 0
}
Author
Stefan Zehnpfennig
Parameters
string$filenamefilePath
string$cidchannelID
integer$sizefileSize in bytes
string$cpwchannelPassword (leave blank if not needed)
boolean$overwriteoverwrite [optional] (default = 0)
boolean$resumeresume [optional] (default = 0)
integer$protoproto (default = NULL) [optional]
Returns
array initUploadFileInfo

◆ ftList()

ftList ( )

ftList

Displays a list of running file transfers on the selected virtual server. The output contains the path to which a file is uploaded to, the current transfer rate in bytes per second, etc

Output:

Array
{
 [clid] => 1
 [cldbid] => 2019
 [path] => files/virtualserver_11/channel_231
 [name] => 1285412348878.png
 [size] => 1161281
 [sizedone] => 275888
 [clientftfid] => 15
 [serverftfid] => 52
 [sender] => 0
 [status] => 1
 [current_speed] => 101037.4453
 [average_speed] => 101037.4453
 [runtime] => 2163
}
Author
Stefan Zehnpfennig
Returns
array fileTransferList

◆ ftRenameFile()

ftRenameFile (   $cid,
  $cpw = null,
  $oldname,
  $newname,
  $tcid = null,
  $tcpw = null 
)

ftRenameFile

Renames a file in a channels file repository. If the two parameters tcid and tcpw are specified, the file will be moved into another channels file repository.

Author
Stefan Zehnpfennig
Parameters
integer$cidchannelID
string$cpwchannelPassword (leave blank if not needed)
string$oldnameoldFilePath
string$newnamenewFilePath
string$tcidtargetChannelID [optional]
string$tcpwtargetChannelPassword [optional]
Returns
array success

◆ ftStop()

ftStop (   $serverftfid,
  $delete = true 
)

ftStop

Stops the running file transfer with server-side ID serverftfid.

Author
Stefan Zehnpfennig
Parameters
integer$serverftfidserverFileTransferID
boolean$deletedelete incomplete file [optional] (default: true)
Returns
array success

◆ ftUploadFile()

ftUploadFile (   $data,
  $uploadData 
)

ftUploadFile

Uploads a file to server To check if upload was successful, you have to search for this file in fileList after

Author
Stefan Zehnpfennig
Parameters
array$datareturn of ftInitUpload
string$uploadDatadata which should be uploaded
Returns
array response

◆ getDebugLog()

getDebugLog ( )

getDebugLog

Returns the debug log

Output:

Array
{
 [0] => Error in login() on line 1908: ErrorID: 520 | Message: invalid loginname or password
 [1] => Error in selectServer() on line 2044: ErrorID: 1540 | Message: convert error
}
Author
Stefan Zehnpfennig
Returns
array debugLog

◆ getElement()

getElement (   $element,
  $array 
)

getElement

Returns the given associated element from an array This can be used to get a result in a one line operation

For example you got this array:

Array
{
 [success] => false
 [errors] => Array 
 [data] => false
}

Now you can grab the element like this:

$ts = new ts3admin('***', '***');
if($ts->getElement('success', $ts->connect())) {
 //operation
}
Author
Stefan Zehnpfennig
Parameters
string$elementkey of element
array$arrayarray
Returns
mixed

◆ getIconByID()

getIconByID (   $iconID)

getIconByID

Will return the base64 encoded binary of the icon

$result = $tsAdmin->getIconByID($iconId);
You can display it like: echo '<img src="data:image/png;base64,'.$result["data"].'" />';
Author
Stefan Zehnpfennig
Parameters
string$iconIDIconID
Returns
array base64 image

◆ getQueryClid()

getQueryClid ( )

getQueryClid

Returns the server query client id

Author
toxiicdev
Returns
int value

◆ gm()

gm (   $msg)

gm

Sends a text message to all clients on all virtual servers in the TeamSpeak 3 Server instance.

Author
Stefan Zehnpfennig
Parameters
string$msgmessage
Returns
array success

◆ hostInfo()

hostInfo ( )

hostInfo

Displays detailed connection information about the server instance including uptime, number of virtual servers online, traffic information, etc.

Output:

Array
{
 [instance_uptime] => 19038
 [host_timestamp_utc] => 1361046825
 [virtualservers_running_total] => 1
 [virtualservers_total_maxclients] => 32
 [virtualservers_total_clients_online] => 1
 [virtualservers_total_channels_online] => 2
 [connection_filetransfer_bandwidth_sent] => 0
 [connection_filetransfer_bandwidth_received] => 0
 [connection_filetransfer_bytes_sent_total] => 0
 [connection_filetransfer_bytes_received_total] => 0
 [connection_packets_sent_total] => 24853
 [connection_bytes_sent_total] => 1096128
 [connection_packets_received_total] => 25404
 [connection_bytes_received_total] => 1153918
 [connection_bandwidth_sent_last_second_total] => 82
 [connection_bandwidth_sent_last_minute_total] => 81
 [connection_bandwidth_received_last_second_total] => 84
 [connection_bandwidth_received_last_minute_total] => 87
}
Author
Stefan Zehnpfennig
Returns
array hostInformation

◆ instanceEdit()

instanceEdit (   $data)

instanceEdit

Changes the server instance configuration using given properties.

Input-Array like this:

$data = array();
$data['setting'] = 'value';
$data['setting'] = 'value';

Possible properties: SERVERINSTANCE_GUEST_SERVERQUERY_GROUP, SERVERINSTANCE_TEMPLATE_SERVERADMIN_GROUP, SERVERINSTANCE_FILETRANSFER_PORT, SERVERINSTANCE_MAX_DOWNLOAD_TOTAL_BANDWITDH, SERVERINSTANCE_MAX_UPLOAD_TOTAL_BANDWITDH, SERVERINSTANCE_TEMPLATE_SERVERDEFAULT_GROUP, SERVERINSTANCE_TEMPLATE_CHANNELDEFAULT_GROUP, SERVERINSTANCE_TEMPLATE_CHANNELADMIN_GROUP, SERVERINSTANCE_SERVERQUERY_FLOOD_COMMANDS, SERVERINSTANCE_SERVERQUERY_FLOOD_TIME, SERVERINSTANCE_SERVERQUERY_FLOOD_BAN_TIME

Author
Stefan Zehnpfennig
Parameters
array$datainstanceProperties
Returns
array success

◆ instanceInfo()

instanceInfo ( )

instanceInfo

Displays the server instance configuration including database revision number, the file transfer port, default group IDs, etc.

Output:

Array
{
 [serverinstance_database_version] => 20
 [serverinstance_filetransfer_port] => 30033
 [serverinstance_max_download_total_bandwidth] => 18446744073709551615
 [serverinstance_max_upload_total_bandwidth] => 18446744073709551615
 [serverinstance_guest_serverquery_group] => 1
 [serverinstance_serverquery_flood_commands] => 10
 [serverinstance_serverquery_flood_time] => 3
 [serverinstance_serverquery_ban_time] => 600
 [serverinstance_template_serveradmin_group] => 3
 [serverinstance_template_serverdefault_group] => 5
 [serverinstance_template_channeladmin_group] => 1
 [serverinstance_template_channeldefault_group] => 4
 [serverinstance_permissions_version] => 15
}
Author
Stefan Zehnpfennig
Returns
array instanceInformation

◆ logAdd()

logAdd (   $logLevel,
  $logMsg 
)

logAdd

Writes a custom entry into the servers log. Depending on your permissions, you'll be able to add entries into the server instance log and/or your virtual servers log. The loglevel parameter specifies the type of the entry.

Hint: Log level 1: "Error", Log Level 2: "Warning", Log Level 3: "Debug", Log level 4: "Info"

Author
Stefan Zehnpfennig
Parameters
integer$logLevelloglevel between 1 and 4
string$logMsglogMessage
Returns
array success

◆ login()

login (   $username,
  $password 
)

login

Authenticates with the TeamSpeak 3 Server instance using given ServerQuery login credentials.

Author
Stefan Zehnpfennig
Parameters
string$usernameusername
string$passwordpassword
Returns
array success

◆ logout()

logout ( )

logout

Deselects the active virtual server and logs out from the server instance.

Author
Stefan Zehnpfennig
Returns
array success

◆ logView()

logView (   $lines,
  $reverse = 0,
  $instance = 0,
  $begin_pos = 0 
)

logView

Displays a specified number of entries from the servers log. If instance is set to 1, the server will return lines from the master logfile (ts3server_0.log) instead of the selected virtual server logfile.

Output:

Array
{
 [last_pos] => 0
 [file_size] => 1085
 [l] => 2012-01-10 20:34:31.379260|INFO    |ServerLibPriv |   | TeamSpeak 3 Server 3.0.1 (2011-11-17 07:34:30)
}
{
 [l] => 2012-01-10 20:34:31.380260|INFO    |DatabaseQuery |   | dbPlugin name:    SQLite3 plugin, Version 2, (c)TeamSpeak Systems GmbH
}
{
 [l] => 2012-01-10 20:34:31.380260|INFO    |DatabaseQuery |   | dbPlugin version: 3.7.3
}
Author
Stefan Zehnpfennig
Parameters
integer$linesbetween 1 and 100
integer$reverse{1|0} [optional]
integer$instance{1|0} [optional]
integer$begin_pos{1|0} [optional]
Returns
array logEntries

◆ messageAdd()

messageAdd (   $cluid,
  $subject,
  $message 
)

messageAdd

Sends an offline message to the client specified by cluid.

Author
Stefan Zehnpfennig
Parameters
string$cluidclientUID
string$subjectSubject of the message
string$messageText of the message
Returns
array success

◆ messageDelete()

messageDelete (   $messageID)

messageDelete

Deletes an existing offline message with ID msgid from your inbox.

Author
Stefan Zehnpfennig
Parameters
string$messageIDmessageID
Returns
array success

◆ messageGet()

messageGet (   $messageID)

messageGet

Displays an existing offline message with ID msgid from your inbox. Please note that this does not automatically set the flag_read property of the message.

Author
Stefan Zehnpfennig
Parameters
string$messageIDmessageID
Returns
array messageInformation

◆ messageList()

messageList ( )

messageList

Displays a list of offline messages you've received. The output contains the senders unique identifier, the messages subject, etc.

Author
Stefan Zehnpfennig
Returns
array messageInformation

◆ messageUpdateFlag()

messageUpdateFlag (   $messageID,
  $flag = 1 
)

messageUpdateFlag

Updates the flag_read property of the offline message specified with msgid. If flag is set to 1, the message will be marked as read.

Author
Stefan Zehnpfennig
Parameters
string$messageIDmessageID
integer$flagflag {1|0}
Returns
array messageInformation

◆ permFind()

permFind (   $perm)

permFind

Displays detailed information about all assignments of the permission specified with permid. The output is similar to permoverview which includes the type and the ID of the client, channel or group associated with the permission. A permission can be specified by permid or permsid.

Output:

Array
{
 [token] => eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3ycDp2OW
}
Author
Stefan Zehnpfennig
Parameters
mixed$permpermid or permsid
Returns
array permissionInfoList

◆ permGet()

permGet (   $perm)

permGet

Displays the current value of the permission specified with permid or permsid for your own connection. This can be useful when you need to check your own privileges.

The perm parameter can be used as permid or permsid, it will switch the mode automatically.

Output:

Array
{
    [permsid] => i_channel_create_modify_with_codec_maxquality
    [permid] => 96
    [permvalue] => 10   
}
Author
Stefan Zehnpfennig
Parameters
mixed$permpermid or permsid
Returns
array permissionInfo

◆ permIdGetByName()

permIdGetByName (   $permsids)

permIdGetByName

Displays the database ID of one or more permissions specified by permsid.

Input-Array like this:

$permissions = array();
$permissions[] = 'permissionName';

Output:

Array
{
 [permsid] => b_serverinstance_help_view
 [permid] => 4353
}
Author
Stefan Zehnpfennig
Parameters
array$permsidspermNames
Returns
array permissionList

◆ permissionList()

permissionList (   $new = false)

permissionList

Displays a list of permissions available on the server instance including ID, name and description. If the new parameter is set the permissionlist will return with the new output format.

Output: (with new parameter)

[0] => Array
    (
        [num] => 1
        [group_id_end] => 0
        [pcount] => 0
    )
[1] => Array
    (
        [num] => 2
        [group_id_end] => 7
        [pcount] => 7
        [permissions] => Array
            (
                [0] => Array
                    (
                        [permid] => 1
                        [permname] => b_serverinstance_help_view
                        [permdesc] => Retrieve information about ServerQuery commands
                        [grantpermid] => 32769
                    )
                [1] => Array
                    (
                        [permid] => 2
                        [permname] => b_serverinstance_version_view
                        [permdesc] => Retrieve global server version (including platform and build number)
                        [grantpermid] => 32770
                    )
                [2] => Array
                    (
                        [permid] => 3
                        [permname] => b_serverinstance_info_view
                        [permdesc] => Retrieve global server information
                        [grantpermid] => 32771
                    )
                [3] => Array
                    (
                        [permid] => 4
                        [permname] => b_serverinstance_virtualserver_list
                        [permdesc] => List virtual servers stored in the database
                        [grantpermid] => 32772
                    )
                [4] => Array
                    (
                        [permid] => 5
                        [permname] => b_serverinstance_binding_list
                        [permdesc] => List active IP bindings on multi-homed machines
                        [grantpermid] => 32773
                    )
               [5] => Array
                    (
                        [permid] => 6
                        [permname] => b_serverinstance_permission_list
                        [permdesc] => List permissions available available on the server instance
                        [grantpermid] => 32774
                    )
                [6] => Array
                    (
                        [permid] => 7
                        [permname] => b_serverinstance_permission_find
                        [permdesc] => Search permission assignments by name or ID
                        [grantpermid] => 32775
                    )
            )
    )
Author
Stefan Zehnpfennig
Parameters
boolean$new[optional] add new parameter
Returns
array permissionList

◆ permOverview()

permOverview (   $cid,
  $cldbid,
  $permid = '0',
  $permsid = false 
)

permOverview

Displays all permissions assigned to a client for the channel specified with cid. If permid is set to 0, all permissions will be displayed. A permission can be specified by permid or permsid.

If you set the permsid parameter, the permid parameter will be ignored.

Output:

Array
{
 [t] => 0
 [id1] => 2
 [id2] => 0
 [p] => 16777
 [v] => 1
 [n] => 0
 [s] => 0
}
Author
Stefan Zehnpfennig
Parameters
integer$cidcchannelId
integer$cldbidclientDbId
integer$permidpermId (Default: 0)
string$permsidpermName
Returns
array permOverview

◆ permReset()

permReset ( )

permReset

Restores the default permission settings on the selected virtual server and creates a new initial administrator token. Please note that in case of an error during the permreset call - e.g. when the database has been modified or corrupted - the virtual server will be deleted from the database.

Output:

Array
{
 [token] => eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3ycDp2OW
}
Author
Stefan Zehnpfennig
Returns
array token

◆ privilegekeyAdd()

privilegekeyAdd (   $tokentype,
  $tokenid1,
  $tokenid2,
  $description = '',
  $customFieldSet = array() 
)

privilegekeyAdd

Create a new token. If tokentype is set to 0, the ID specified with tokenid1 will be a server group ID. Otherwise, tokenid1 is used as a channel group ID and you need to provide a valid channel ID using tokenid2. The tokencustomset parameter allows you to specify a set of custom client properties. This feature can be used when generating tokens to combine a website account database with a TeamSpeak user. The syntax of the value needs to be escaped using the ServerQuery escape patterns and has to follow the general syntax of: ident=ident1 value=value1|ident=ident2 value=value2|ident=ident3 value=value3

Input-Array like this:

$customFieldSet = array();
$customFieldSet['ident'] = 'value';
$customFieldSet['ident'] = 'value';
Author
Stefan Zehnpfennig
Parameters
integer$tokentypetoken type
integer$tokenid1groupID
integer$tokenid2channelID
string$descriptiontoken description [optional]
array$customFieldSetcustomFieldSet [optional]
Returns
array tokenInformation

◆ privilegekeyDelete()

privilegekeyDelete (   $token)

privilegekeyDelete

Deletes an existing token matching the token key specified with token.

Author
Stefan Zehnpfennig
Parameters
string$tokentoken
Returns
array success

◆ privilegekeyList()

privilegekeyList ( )

privilegekeyList

Displays a list of privilege keys available including their type and group IDs. Tokens can be used to gain access to specified server or channel groups. A privilege key is similar to a client with administrator privileges that adds you to a certain permission group, but without the necessity of a such a client with administrator privileges to actually exist. It is a long (random looking) string that can be used as a ticket into a specific server group.

Output:

Array
{
 [token] => GdqedxSEDle3e9+LtR3o9dO09bURH+vymvF5hOJg
 [token_type] => 0
 [token_id1] => 71
 [token_id2] => 0
 [token_created] => 1286625908
 [token_description] => for you
}
Author
Stefan Zehnpfennig
Returns
array tokenListist

◆ privilegekeyUse()

privilegekeyUse (   $token)

privilegekeyUse

Use a token key gain access to a server or channel group. Please note that the server will automatically delete the token after it has been used.

Author
Stefan Zehnpfennig
Parameters
string$tokentoken
Returns
array success

◆ readChatMessage()

readChatMessage (   $type = 'textchannel',
  $keepalive = false,
  $cid = -1 
)

readChatMessage

Read chat message by its type (Result: http://bit.ly/2dtBXnT)

IMPORTANT: Check always for message success, sometimes you can get an empty message and it will return empty data

Output:

Array
{
    [invokerid] => 37
    [invokeruid] => /jl8QCHJWrHDKXgVtF+9FX7zg1E=
    [invokername] => toxiicdev.net
    [msg] => It's just a prank bro
    [targetmode] => 3
}
Author
toxiicdev
Parameters
string$typetextserver|textchannel|textprivate
boolean$keepalivedefault false
int$cidchannel id (required only for textchannel)
Returns
array data

◆ selectServer()

selectServer (   $value,
  $type = 'port',
  $virtual = false 
)

selectServer

Selects the virtual server specified with sid or port to allow further interaction. The ServerQuery client will appear on the virtual server and acts like a real TeamSpeak 3 Client, except it's unable to send or receive voice data. If your database contains multiple virtual servers using the same UDP port, use will select a random virtual server using the specified port.

Author
Stefan Zehnpfennig
Parameters
integer$valuePort or ID
string$typevalue type ('port', 'serverId') (default='port')
boolean$virtualset true to add -virtual param [optional]
Returns
array success

◆ sendMessage()

sendMessage (   $mode,
  $target,
  $msg 
)

sendMessage

Sends a text message a specified target. The type of the target is determined by targetmode while target specifies the ID of the recipient, whether it be a virtual server, a channel or a client. Hint: You can just write to the channel the query client is in. See link in description for details.

Modes:

  • 1: send to client
  • 2: send to channel
  • 3: send to server

Targets:

  • clientID
  • channelID
  • serverID
Author
Stefan Zehnpfennig
Parameters
integer$mode
integer$target
string$msgMessage
See also
http://forum.teamspeak.com/showthread.php/84280-Sendtextmessage-by-query-client http://forum.teamspeak.com/showthread.php/84280-Sendtextmessage-by-query-client
Returns
array success

◆ serverCreate()

serverCreate (   $data = array())

serverCreate

Creates a new virtual server using the given properties and displays its ID, port and initial administrator privilege key. If virtualserver_port is not specified, the server will test for the first unused UDP port. The first virtual server will be running on UDP port 9987 by default. Subsequently started virtual servers will be running on increasing UDP port numbers.

Input-Array like this:

$data = array();
$data['setting'] = 'value';
$data['setting'] = 'value';

Output:

Array
{
 [sid] => 2
 [virtualserver_port] => 9988
 [token] => eKnFZQ9EK7G7MhtuQB6+N2B1PNZZ6OZL3ycDp2OW
}

Possible properties: VIRTUALSERVER_NAME, VIRTUALSERVER_WELCOMEMESSAGE, VIRTUALSERVER_MAXCLIENTS, VIRTUALSERVER_PASSWORD, VIRTUALSERVER_HOSTMESSAGE, VIRTUALSERVER_HOSTMESSAGE_MODE, VIRTUALSERVER_DEFAULT_SERVER_GROUP, VIRTUALSERVER_DEFAULT_CHANNEL_GROUP, VIRTUALSERVER_DEFAULT_CHANNEL_ADMIN_GROUP, VIRTUALSERVER_MAX_DOWNLOAD_TOTAL_BANDWIDTH, VIRTUALSERVER_MAX_UPLOAD_TOTAL_BANDWIDTH, VIRTUALSERVER_HOSTBANNER_URL, VIRTUALSERVER_HOSTBANNER_GFX_URL, VIRTUALSERVER_HOSTBANNER_GFX_INTERVAL, VIRTUALSERVER_COMPLAIN_AUTOBAN_COUNT, VIRTUALSERVER_COMPLAIN_AUTOBAN_TIME, VIRTUALSERVER_COMPLAIN_REMOVE_TIME, VIRTUALSERVER_MIN_CLIENTS_IN_CHANNEL_BEFORE_FORCED_SILENCE, VIRTUALSERVER_PRIORITY_SPEAKER_DIMM_MODIFICATOR, VIRTUALSERVER_ANTIFLOOD_POINTS_TICK_REDUCE, VIRTUALSERVER_ANTIFLOOD_POINTS_NEEDED_COMMAND_BLOCK, VIRTUALSERVER_ANTIFLOOD_POINTS_NEEDED_IP_BLOCK, VIRTUALSERVER_HOSTBANNER_MODE, VIRTUALSERVER_HOSTBUTTON_TOOLTIP, VIRTUALSERVER_HOSTBUTTON_GFX_URL, VIRTUALSERVER_HOSTBUTTON_URL, VIRTUALSERVER_DOWNLOAD_QUOTA, VIRTUALSERVER_UPLOAD_QUOTA, VIRTUALSERVER_MACHINE_ID, VIRTUALSERVER_PORT, VIRTUALSERVER_AUTOSTART, VIRTUALSERVER_STATUS, VIRTUALSERVER_LOG_CLIENT, VIRTUALSERVER_LOG_QUERY, VIRTUALSERVER_LOG_CHANNEL, VIRTUALSERVER_LOG_PERMISSIONS, VIRTUALSERVER_LOG_SERVER, VIRTUALSERVER_LOG_FILETRANSFER, VIRTUALSERVER_MIN_CLIENT_VERSION, VIRTUALSERVER_MIN_ANDROID_VERSION, VIRTUALSERVER_MIN_IOS_VERSION, VIRTUALSERVER_MIN_WINPHONE_VERSION, VIRTUALSERVER_NEEDED_IDENTITY_SECURITY_LEVEL, VIRTUALSERVER_NAME_PHONETIC, VIRTUALSERVER_ICON_ID, VIRTUALSERVER_RESERVED_SLOTS, VIRTUALSERVER_WEBLIST_ENABLED, VIRTUALSERVER_CODEC_ENCRYPTION_MODE

Author
Stefan Zehnpfennig
Parameters
array$dataserverSettings [optional]
Returns
array serverInfo

◆ serverDelete()

serverDelete (   $sid)

serverDelete

Deletes the virtual server specified with sid. Please note that only virtual servers in stopped state can be deleted.

Author
Stefan Zehnpfennig
Parameters
integer$sidserverID
Returns
array success

◆ serverEdit()

serverEdit (   $data)

serverEdit

Changes the selected virtual servers configuration using given properties. Note that this command accepts multiple properties which means that you're able to change all settings of the selected virtual server at once.

Input-Array like this:

$data = array();
$data['setting'] = 'value';
$data['setting'] = 'value';

Possible properties: Take a look at serverCreate function

Author
Stefan Zehnpfennig
Parameters
array$dataserverSettings
Returns
array success

◆ serverGroupAdd()

serverGroupAdd (   $name,
  $type = 1 
)

serverGroupAdd

Creates a new server group using the name specified with name and displays its ID. The optional type parameter can be used to create ServerQuery groups and template groups. For detailed information, see

Output:

Array
{
 [sgid] => 86
}
Author
Stefan Zehnpfennig
Parameters
integer$namegroupName
integer$typegroupDbType (0 = template, 1 = normal, 2 = query | Default: 1)
Returns
array groupId

◆ serverGroupAddClient()

serverGroupAddClient (   $sgid,
  $cldbid 
)

serverGroupAddClient

Adds a client to the server group specified with sgid. Please note that a client cannot be added to default groups or template groups.

Author
Stefan Zehnpfennig
Parameters
integer$sgidserverGroupId
integer$cldbidclientDBID
Returns
array success

◆ serverGroupAddPerm()

serverGroupAddPerm (   $sgid,
  $permissions 
)

serverGroupAddPerm

Adds a set of specified permissions to the server group specified with sgid. Multiple permissions can be added by providing the four parameters of each permission. A permission can be specified by permid or permsid.

Input-Array like this:

$permissions = array();
$permissions['permissionID'] = array('permissionValue', 'permskip', 'permnegated');
//or you could use
$permissions['permissionName'] = array('permissionValue', 'permskip', 'permnegated');
Author
Stefan Zehnpfennig
Parameters
integer$sgidserverGroupID
array$permissionspermissions
Returns
array success

◆ serverGroupAutoAddPerm()

serverGroupAutoAddPerm (   $sgtype,
  $permissions 
)

serverGroupAutoAddPerm

Adds a set of specified permissions to ALL regular server groups on all virtual servers. The target groups will be identified by the value of their i_group_auto_update_type permission specified with sgtype. Multiple permissions can be added at once. A permission can be specified by permid or permsid. The known values for sgtype are: 10: Channel Guest 15: Server Guest 20: Query Guest 25: Channel Voice 30: Server Normal 35: Channel Operator 40: Channel Admin 45: Server Admin 50: Query Admin

Input-Array like this:

$permissions = array();
$permissions['permissionID'] = array('permissionValue', 'permskip', 'permnegated');
//or you could use
$permissions['permissionName'] = array('permissionValue', 'permskip', 'permnegated');
Author
Stefan Zehnpfennig
Parameters
integer$sgtypeserverGroupType
array$permissionspermissions
Returns
array success

◆ serverGroupAutoDeletePerm()

serverGroupAutoDeletePerm (   $sgtype,
  $permissions 
)

serverGroupAutoDeletePerm

Removes a set of specified permissions from ALL regular server groups on all virtual servers. The target groups will be identified by the value of their i_group_auto_update_type permission specified with sgtype. Multiple permissions can be removed at once. A permission can be specified by permid or permsid. The known values for sgtype are: 10: Channel Guest 15: Server Guest 20: Query Guest 25: Channel Voice 30: Server Normal 35: Channel Operator 40: Channel Admin 45: Server Admin 50: Query Admin

Input-Array like this:

$permissions = array();
$permissions[] = 'permissionID';
//or you could use
$permissions[] = 'permissionName';
Author
Stefan Zehnpfennig
Parameters
integer$sgtypeserverGroupType
array$permissionspermissions
Returns
array success

◆ serverGroupClientList()

serverGroupClientList (   $sgid,
  $names = false 
)

serverGroupClientList

Displays the IDs of all clients currently residing in the server group specified with sgid. If you're using the optional -names option, the output will also contain the last known nickname and the unique identifier of the clients.

Possible params: -names

Output: (with -names param)

Array
{
 [cldbid] => 2017
 [client_nickname] => Par0noid //with -names parameter
 [client_unique_identifier] => nUixbsq/XakrrmbqU8O30R/D8Gc=
}
Author
Stefan Zehnpfennig
Parameters
integer$sgidgroupId
boolean$namesset true to add -names param [optional]
Returns
array serverGroupClientList

◆ serverGroupCopy()

serverGroupCopy (   $ssgid,
  $tsgid,
  $name,
  $type = 1 
)

serverGroupCopy

Creates a copy of the server group specified with ssgid. If tsgid is set to 0, the server will create a new group. To overwrite an existing group, simply set tsgid to the ID of a designated target group. If a target group is set, the name parameter will be ignored.

Output:

Array
{
 [sgid] => 86
}
Author
Stefan Zehnpfennig
Parameters
integer$ssgidsourceGroupID
integer$tsgidtargetGroupID
integer$namegroupName
integer$typegroupDbType (0 = template, 1 = normal, 2 = query | Default: 1)
Returns
array groupId

◆ serverGroupDelete()

serverGroupDelete (   $sgid,
  $force = 1 
)

serverGroupDelete

Deletes the server group specified with sgid. If force is set to 1, the server group will be deleted even if there are clients within.

Author
Stefan Zehnpfennig
Parameters
integer$sgidserverGroupID
integer$forceforces deleting group (Default: 1)
Returns
array success

◆ serverGroupDeleteClient()

serverGroupDeleteClient (   $sgid,
  $cldbid 
)

serverGroupDeleteClient

Removes a client specified with cldbid from the server group specified with sgid.

Author
Stefan Zehnpfennig
Parameters
integer$sgidgroupID
integer$cldbidclientDBID
Returns
array success

◆ serverGroupDeletePerm()

serverGroupDeletePerm (   $sgid,
  $permissionIds 
)

serverGroupDeletePerm

Removes a set of specified permissions from the server group specified with sgid. Multiple permissions can be removed at once. A permission can be specified by permid or permsid.

Input-Array like this:

$permissions = array();
$permissions[] = 'permissionID';
//or you could use
$permissions[] = 'permissionName';
Author
Stefan Zehnpfennig
Parameters
integer$sgidserverGroupID
array$permissionIdspermissionIds
Returns
array success

◆ serverGroupGetIconBySGID()

serverGroupGetIconBySGID (   $serverGroupID)

serverGroupGetIconBySGID

Will return the base64 encoded binary of the serverGroupIcon

$result = $tsAdmin->serverGroupGetIconBySGID($serverGroupID);
You can display it like: echo '<img src="data:image/png;base64,'.$result["data"].'" />';
Author
Stefan Zehnpfennig
Parameters
string$serverGroupIDserverGroupID
Returns
array base64 image

◆ serverGroupList()

serverGroupList (   $type = null)

serverGroupList

Displays a list of server groups available. Depending on your permissions, the output may also contain global ServerQuery groups and template groups.

Output:

Array
{
 [sgid] => 1
 [name] => Guest Server Query
 [type] => 2
 [iconid] => 0
 [savedb] => 0
 [sortid] => 0
 [namemode] => 0
 [n_modifyp] => 100
 [n_member_addp] => 0
 [n_member_removep] => 0
}
Author
Stefan Zehnpfennig
Parameters
integer$typegroupDbType (0 = template, 1 = normal, 2 = query) By default get all groups
Returns
array serverGroupList

◆ serverGroupPermList()

serverGroupPermList (   $sgid,
  $permsid = false 
)

serverGroupPermList

Displays a list of permissions assigned to the server group specified with sgid. If the permsid option is specified, the output will contain the permission names instead of the internal IDs.

Output:

Array
{
 [permid] => 12876 (if permsid = false)
 [permsid] => b_client_info_view (if permsid = true)
 [permvalue] => 1
 [permnegated] => 0
 [permskip] => 0
}
Author
Stefan Zehnpfennig
Parameters
integer$sgidserverGroupID
boolean$permsidset true to add -permsid param [optional]
Returns
array serverGroupPermList

◆ serverGroupRename()

serverGroupRename (   $sgid,
  $name 
)

serverGroupRename

Changes the name of the server group specified with sgid.

Author
Stefan Zehnpfennig
Parameters
integer$sgidserverGroupID
integer$namegroupName
Returns
array success

◆ serverGroupsByClientID()

serverGroupsByClientID (   $cldbid)

serverGroupsByClientID

Displays all server groups the client specified with cldbid is currently residing in.

Output:

Array
{
 [name] => Guest
 [sgid] => 73
 [cldbid] => 2
}
Author
Stefan Zehnpfennig
Parameters
integer$cldbidclientDBID
Returns
array serverGroupsByClientId

◆ serverIdGetByPort()

serverIdGetByPort (   $port)

serverIdGetByPort

Displays the database ID of the virtual server running on the UDP port specified by virtualserver_port.

Output:

Array
{
 [server_id] => 1
}
Author
Stefan Zehnpfennig
Parameters
integer$portserverPort
Returns
array serverInfo

◆ serverInfo()

serverInfo ( )

serverInfo

Displays detailed configuration information about the selected virtual server including unique ID, number of clients online, configuration, etc.

Output:

Array
{
 [virtualserver_unique_identifier] => 1GvKR12fg/mY75flwN/u7pn7KIs=
 [virtualserver_name] => TeamSpeak ]I[ Server
 [virtualserver_welcomemessage] => Welcome to TeamSpeak, check [URL]www.teamspeak.com[/URL] for latest information
 [virtualserver_platform] => Windows
 [virtualserver_version] => 3.0.12.4 [Build: 1461597405]
 [virtualserver_maxclients] => 32
 [virtualserver_password] => 
 [virtualserver_clientsonline] => 2
 [virtualserver_channelsonline] => 1
 [virtualserver_created] => 0
 [virtualserver_uptime] => 6517
 [virtualserver_codec_encryption_mode] => 0
 [virtualserver_hostmessage] => 
 [virtualserver_hostmessage_mode] => 0
 [virtualserver_filebase] => files\virtualserver_1
 [virtualserver_default_server_group] => 11
 [virtualserver_default_channel_group] => 12
 [virtualserver_flag_password] => 0
 [virtualserver_default_channel_admin_group] => 9
 [virtualserver_max_download_total_bandwidth] => 18446744073709551615
 [virtualserver_max_upload_total_bandwidth] => 18446744073709551615
 [virtualserver_hostbanner_url] => 
 [virtualserver_hostbanner_gfx_url] => 
 [virtualserver_hostbanner_gfx_interval] => 0
 [virtualserver_complain_autoban_count] => 5
 [virtualserver_complain_autoban_time] => 1200
 [virtualserver_complain_remove_time] => 3600
 [virtualserver_min_clients_in_channel_before_forced_silence] => 100
 [virtualserver_priority_speaker_dimm_modificator] => -18.0000
 [virtualserver_id] => 1
 [virtualserver_antiflood_points_tick_reduce] => 5
 [virtualserver_antiflood_points_needed_command_block] => 150
 [virtualserver_antiflood_points_needed_ip_block] => 250
 [virtualserver_client_connections] => 1
 [virtualserver_query_client_connections] => 54
 [virtualserver_hostbutton_tooltip] => 
 [virtualserver_hostbutton_url] => 
 [virtualserver_hostbutton_gfx_url] => 
 [virtualserver_queryclientsonline] => 1
 [virtualserver_download_quota] => 18446744073709551615
 [virtualserver_upload_quota] => 18446744073709551615
 [virtualserver_month_bytes_downloaded] => 0
 [virtualserver_month_bytes_uploaded] => 16045
 [virtualserver_total_bytes_downloaded] => 0
 [virtualserver_total_bytes_uploaded] => 16045
 [virtualserver_port] => 9987
 [virtualserver_autostart] => 1
 [virtualserver_machine_id] => 
 [virtualserver_needed_identity_security_level] => 8
 [virtualserver_log_client] => 0
 [virtualserver_log_query] => 0
 [virtualserver_log_channel] => 0
 [virtualserver_log_permissions] => 1
 [virtualserver_log_server] => 0
 [virtualserver_log_filetransfer] => 0
 [virtualserver_min_client_version] => 1445512488
 [virtualserver_name_phonetic] => 
 [virtualserver_icon_id] => 0
 [virtualserver_reserved_slots] => 0
 [virtualserver_total_packetloss_speech] => 0.0000
 [virtualserver_total_packetloss_keepalive] => 0.0000
 [virtualserver_total_packetloss_control] => 0.0000
 [virtualserver_total_packetloss_total] => 0.0000
 [virtualserver_total_ping] => 0.0000
 [virtualserver_ip] => 
 [virtualserver_weblist_enabled] => 1
 [virtualserver_ask_for_privilegekey] => 0
 [virtualserver_hostbanner_mode] => 0
 [virtualserver_channel_temp_delete_delay_default] => 0
 [virtualserver_min_android_version] => 1407159763
 [virtualserver_min_ios_version] => 1407159763
 [virtualserver_status] => online
 [connection_filetransfer_bandwidth_sent] => 0
 [connection_filetransfer_bandwidth_received] => 0
 [connection_filetransfer_bytes_sent_total] => 0
 [connection_filetransfer_bytes_received_total] => 0
 [connection_packets_sent_speech] => 0
 [connection_bytes_sent_speech] => 0
 [connection_packets_received_speech] => 0
 [connection_bytes_received_speech] => 0
 [connection_packets_sent_keepalive] => 12959
 [connection_bytes_sent_keepalive] => 531319
 [connection_packets_received_keepalive] => 12959
 [connection_bytes_received_keepalive] => 544277
 [connection_packets_sent_control] => 396
 [connection_bytes_sent_control] => 65555
 [connection_packets_received_control] => 397
 [connection_bytes_received_control] => 44930
 [connection_packets_sent_total] => 13355
 [connection_bytes_sent_total] => 596874
 [connection_packets_received_total] => 13356
 [connection_bytes_received_total] => 589207
 [connection_bandwidth_sent_last_second_total] => 81
 [connection_bandwidth_sent_last_minute_total] => 92
 [connection_bandwidth_received_last_second_total] => 83
 [connection_bandwidth_received_last_minute_total] => 88
}
Author
Stefan Zehnpfennig
Returns
array serverInformation

◆ serverList()

serverList (   $options = NULL)

serverList

Displays a list of virtual servers including their ID, status, number of clients online, etc. If you're using the -all option, the server will list all virtual servers stored in the database. This can be useful when multiple server instances with different machine IDs are using the same database. The machine ID is used to identify the server instance a virtual server is associated with. The status of a virtual server can be either online, offline, deploy running, booting up, shutting down and virtual online. While most of them are self-explanatory, virtual online is a bit more complicated. Please note that whenever you select a virtual server which is currently stopped, it will be started in virtual mode which means you are able to change its configuration, create channels or change permissions, but no regular TeamSpeak 3 Client can connect. As soon as the last ServerQuery client deselects the virtual server, its status will be changed back to offline.

Possible params: [-uid] [-short] [-all] [-onlyoffline]

Output:

Array
{
 [virtualserver_id] => 1 //displayed on -short
 [virtualserver_port] => 9987 //displayed on -short
 [virtualserver_status] => online //displayed on -short
 [virtualserver_clientsonline] => 2
 [virtualserver_queryclientsonline] => 1
 [virtualserver_maxclients] => 32
 [virtualserver_uptime] => 3045
 [virtualserver_name] => TeamSpeak ]I[ Server
 [virtualserver_autostart] => 1
 [virtualserver_machine_id] =>
 [-uid] => [virtualserver_unique_identifier] => bYrybKl/APfKq7xzpIJ1Xb6C06U= 
}
Author
Stefan Zehnpfennig
Parameters
string$optionsoptional parameters
Returns
array serverList

◆ serverNotifyUnregister()

serverNotifyUnregister ( )

serverNotifyUnregister

Unregisters server notify event

Author
toxiicdev

◆ serverProcessStop()

serverProcessStop (   $reasonMessage = null)

serverProcessStop

Stops the entire TeamSpeak 3 Server instance by shutting down the process.

Author
Stefan Zehnpfennig
Parameters
string$reasonMessagereasonMessage [optional]
Returns
array success

◆ serverRequestConnectionInfo()

serverRequestConnectionInfo ( )

serverRequestConnectionInfo

Displays detailed connection information about the selected virtual server including uptime, traffic information, etc.

Output:

Array
{
 [connection_filetransfer_bandwidth_sent] => 0
 [connection_filetransfer_bandwidth_received] => 0
 [connection_filetransfer_bytes_sent_total] => 0
 [connection_filetransfer_bytes_received_total] => 0
 [connection_packets_sent_total] => 3333
 [connection_bytes_sent_total] => 149687
 [connection_packets_received_total] => 3333
 [connection_bytes_received_total] => 147653
 [connection_bandwidth_sent_last_second_total] => 123
 [connection_bandwidth_sent_last_minute_total] => 81
 [connection_bandwidth_received_last_second_total] => 352
 [connection_bandwidth_received_last_minute_total] => 87
 [connection_connected_time] => 3387
 [connection_packetloss_total] => 0.0000
 [connection_ping] => 0.0000
}
Author
Stefan Zehnpfennig
Returns
array serverRequestConnectionInfo

◆ serverSnapshotCreate()

serverSnapshotCreate ( )

serverSnapshotCreate

Displays a snapshot of the selected virtual server containing all settings, groups and known client identities. The data from a server snapshot can be used to restore a virtual servers configuration, channels and permissions using the serversnapshotdeploy command.

Author
Stefan Zehnpfennig
Returns
array snapshot

◆ serverSnapshotDeploy()

serverSnapshotDeploy (   $snapshot,
  $mapping = false 
)

serverSnapshotDeploy

Restores the selected virtual servers configuration using the data from a previously created server snapshot. Please note that the TeamSpeak 3 Server does NOT check for necessary permissions while deploying a snapshot so the command could be abused to gain additional privileges.

  • added "-mapping" to the serversnapshotdeploy command. This optional parameters will add a mapping of the old and new channelid's in the return
Author
Stefan Zehnpfennig
Parameters
string$snapshotsnapshot
bool$mappingmapping [optional]
Returns
array success

◆ serverStart()

serverStart (   $sid)

serverStart

Starts the virtual server specified with sid. Depending on your permissions, you're able to start either your own virtual server only or all virtual servers in the server instance.

Author
Stefan Zehnpfennig
Parameters
integer$sidserverID
Returns
array success

◆ serverStop()

serverStop (   $sid,
  $reasonMessage = null 
)

serverStop

Stops the virtual server specified with sid. Depending on your permissions, you're able to stop either your own virtual server only or all virtual servers in the server instance.

Author
Stefan Zehnpfennig
Parameters
integer$sidserverID
string$reasonMessagereasonMessage [optional]
Returns
array success

◆ serverTempPasswordAdd()

serverTempPasswordAdd (   $pw,
  $duration,
  $desc = 'none',
  $tcid = 0,
  $tcpw = null 
)

serverTemppasswordAdd

Sets a new temporary server password specified with pw. The temporary password will be valid for the number of seconds specified with duration. The client connecting with this password will automatically join the channel specified with tcid. If tcid is set to 0, the client will join the default channel.

Author
Stefan Zehnpfennig
Parameters
string$pwtemporary password
string$durationdurations in seconds
string$descdescription [optional]
integer$tcidcid user enters on connect (0 = Default channel) [optional]
string$tcpwchannelPW
Returns
array success

◆ serverTempPasswordDel()

serverTempPasswordDel (   $pw)

serverTemppasswordDel

Deletes the temporary server password specified with pw.

Author
Stefan Zehnpfennig
Parameters
string$pwtemporary password
Returns
array success

◆ serverTempPasswordList()

serverTempPasswordList ( )

serverTemppasswordList

Returns a list of active temporary server passwords. The output contains the clear-text password, the nickname and unique identifier of the creating client.

Output:

Array
{
 [nickname] => serveradmin
 [uid] => 1
 [desc] => none
 [pw_clear] => test
 [start] => 1334996838
 [end] => 1335000438
 [tcid] => 0
}
Author
Stefan Zehnpfennig
Returns
array serverTemppasswordList

◆ setClientChannelGroup()

setClientChannelGroup (   $cgid,
  $cid,
  $cldbid 
)

setClientChannelGroup

Sets the channel group of a client to the ID specified with cgid.

Author
Stefan Zehnpfennig
Parameters
integer$cgidgroupID
integer$cidchannelID
integer$cldbidclientDBID
Returns
array success

◆ setName()

setName (   $newName)

setName

Sets your nickname in server query

Author
Stefan Zehnpfennig
Parameters
string$newNamenew name in server query
Returns
array success

◆ succeeded()

succeeded (   $array)

succeeded

Succeeded will check the success element of a return array

$ts = new ts3admin('***', '***');
if($ts->succeeded($ts->connect())) {
 //operation
}
Author
Stefan Zehnpfennig
Parameters
array$arrayresult
Returns
boolean

◆ tokenAdd()

tokenAdd (   $tokentype,
  $tokenid1,
  $tokenid2,
  $description = '',
  $customFieldSet = array() 
)

tokenAdd

Create a new token. If tokentype is set to 0, the ID specified with tokenid1 will be a server group ID. Otherwise, tokenid1 is used as a channel group ID and you need to provide a valid channel ID using tokenid2. The tokencustomset parameter allows you to specify a set of custom client properties. This feature can be used when generating tokens to combine a website account database with a TeamSpeak user. The syntax of the value needs to be escaped using the ServerQuery escape patterns and has to follow the general syntax of: ident=ident1 value=value1|ident=ident2 value=value2|ident=ident3 value=value3

Input-Array like this:

$customFieldSet = array();
$customFieldSet['ident'] = 'value';
$customFieldSet['ident'] = 'value';
Author
Stefan Zehnpfennig
Parameters
integer$tokentypetoken type
integer$tokenid1groupID
integer$tokenid2channelID
string$descriptiontoken description [optional]
array$customFieldSetcustomFieldSet [optional]
Returns
array tokenInformation

◆ tokenDelete()

tokenDelete (   $token)

tokenDelete

Deletes an existing token matching the token key specified with token.

Author
Stefan Zehnpfennig
Parameters
string$tokentoken
Returns
array success

◆ tokenList()

tokenList ( )

tokenList

Displays a list of privilege keys available including their type and group IDs. Tokens can be used to gain access to specified server or channel groups. A privilege key is similar to a client with administrator privileges that adds you to a certain permission group, but without the necessity of a such a client with administrator privileges to actually exist. It is a long (random looking) string that can be used as a ticket into a specific server group.

Output:

Array
{
 [token] => GdqedxSEDle3e9+LtR3o9dO09bURH+vymvF5hOJg
 [token_type] => 0
 [token_id1] => 71
 [token_id2] => 0
 [token_created] => 1286625908
 [token_description] => for you
}
Author
Stefan Zehnpfennig
Returns
array tokenListist

◆ tokenUse()

tokenUse (   $token)

tokenUse

Use a token key gain access to a server or channel group. Please note that the server will automatically delete the token after it has been used.

Author
Stefan Zehnpfennig
Parameters
string$tokentoken
Returns
array success

◆ uploadIcon()

uploadIcon (   $filepath,
  $iconID = -1 
)

uploadIcon

Uploads an icon to the server

Output:

Array
{
 [cid] => 0
 [name] => /icon_1947482249
 [size] => 744
 [datetime] => 1286633633
}
Author
Stefan Zehnpfennig
Parameters
string$filepathPath to your file
string | integer$iconID[optional] Desired IconID (Must be higher than 1.000.000.000, and lower than 2.147.483.647)
Returns
array ftGetFileInfo

◆ version()

version ( )

version

Displays the servers version information including platform and build number.

Output:

Array
{
 [version] => 3.0.6.1
 [build] => 1340956745
 [platform] => Windows
}
Author
Stefan Zehnpfennig
Returns
array versionInformation

◆ whoAmI()

whoAmI ( )

whoAmI

Displays information about your current ServerQuery connection including your loginname, etc.

Output:

Array
{
 [virtualserver_status] => online
 [virtualserver_id] => 1
 [virtualserver_unique_identifier] => bYrybKl/APfKq7xzpIJ1Xb6C06U=
 [virtualserver_port] => 9987
 [client_id] => 5
 [client_channel_id] => 1
 [client_nickname] => serveradmin from 127.0.0.1:15208
 [client_database_id] => 1
 [client_login_name] => serveradmin
 [client_unique_identifier] => serveradmin
 [client_origin_server_id] => 0
}
Author
Stefan Zehnpfennig
Returns
array clientinformation

The documentation for this class was generated from the following file: