tsac
[ class tree: tsac ] [ index: tsac ] [ all elements ]

Class: tsac

Source Location: /tsac.class.php

Class Overview


Class-level DocBlock


Author(s):

  • Nils Hulsch

Version:

  • 1.1

Copyright:

  • (c) Nils Hulsch

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 15]
Class-level DocBlock



Tags:

version:  1.1
copyright:  (c) Nils Hulsch
author:  Nils Hulsch


[ Top ]


Class Variables

$error =

[line 25]


Type:   string


[ Top ]

$socket =

[line 20]


Type:   mixed


[ Top ]



Class Methods


method addserver [line 440]

bool addserver( integer $port, integer $maxusers, string $adminname, string $adminpw, [string $password = ""], [string $servername = "TeamSpeak Server"])

Adds a new server



Tags:

return:  TRUE on success, FALSE on failure


Parameters:

integer   $port   Port of the new server
integer   $maxusers   The maximum users allowed on this server
string   $adminname   The Username of the admin User.
string   $adminpw   The password of the 'admin' User
string   $password   The password of the server. (optional)
string   $servername   The name of the server (optional). Can be up to 29 characters

[ Top ]

method adduser [line 412]

bool adduser( integer $port, string $name, string $password, [integer $admin = 0])

Adds a new user to the server



Tags:

return:  TRUE on success, FALSE on failure


Parameters:

integer   $port   Port of the server
string   $name   Loginname of the user
string   $password   Password of the user
integer   $admin   1 = yes, 0 = no (default)

[ Top ]

method connect [line 35]

bool connect( string $ip, integer $port, string $user, string $password)

Connect and verify TS-Server



Tags:

return:  TRUE on established and verified connection, FALSE on failures.


Parameters:

string   $ip   IP of the TS-Server
integer   $port   Port of TS-Server
string   $user   Superadmin user
string   $password   Password of Superadmin

[ Top ]

method deleteserver [line 472]

bool deleteserver( integer $port)

Deletes the specified server



Tags:

return:  TRUE on success, FALSE on failure


Parameters:

integer   $port   Port of the server

[ Top ]

method disconnect [line 74]

bool disconnect( )

Close the socket



Tags:

return:  TRUE on success, FALSE on failure


[ Top ]

method getglobalinfo [line 513]

mixed getglobalinfo( [integer $raw = 0])

Get global informations from the server

parsed list:
array['total_server_uptime'] returns the serveruptime
array['total_server_version'] returns the serverversion
array['total_server_platform'] returns the serverplatform
array['total_servers'] returns the amount of virtual servers
array['total_users_online'] return the current amount of online users
array['total_users_maximal'] returns the maximum amount of users on all servers
array['total_channels'] returns the current amount of channels on all servers
array['total_bytesreceived'] returns the amount of bytes the server received
array['total_bytessend'] returns the amount of bytes the server sent
array['total_packetssend'] returns the amount of packets the server sent
array['total_packetsreceived'] returns the amount of packets the server received
array['total_bwoutlastmin'] returns the amount of bytes sent in the last minute
array['total_bwoutlastsec'] returns the amount of bytes sent in the last second
array['total_bwinlastmin'] returns the amount of bytes received in the last minute
array['total_bwinlastsec'] returns the amount of bytes received in the last second
array['isp_ispname'] returns the name of the ISP set in the config
array['isp_linkurl'] returns the url of the ISP
array['isp_adminemail'] returns the admin contact of the ISP
array['isp_countrynumber'] returns the countrynumber of the ISP




Tags:

return:  raw globalinfo on success (raw=1), parsed serverlist as array (raw=0), FALSE on failure


Parameters:

integer   $raw   raw (1) or parsed (0) list (default=0)

[ Top ]

method getplayerlist [line 147]

mixed getplayerlist( integer $port, [integer $raw = 0])

Get playerlist from a specified port

parsed list:
array[i]['player_id'] returns the playerid
array[i]['channel_id'] returns the channelid of the chanenl where the player is in
array[i]['packets_sent'] returns the amount of packets the client sent to the server
array[i]['bytes_sent'] returns the amount of bytes the client sent to the server
array[i]['packets_received'] returns the amount of packets the client received from the server
array[i]['bytes_received'] returns the amount of bytes the client received from the server
array[i]['packets_lost'] returns the amount of losts packets
array[i]['ping'] returns the ping of the client to the server in milliseconds
array[i]['logintime'] returns the time in seconds since the user is connected to the server
array[i]['idletime'] returns the time in seconds the user is idling
array[i]['cprivs'] returns the current channel privileges. (CA=1,O=2,V=4,AO=8,AV=16)
array[i]['pprivs'] returns the current player privileges. (SA=1,Allow Registration=2,Registred=4,Internal Use=8, Stickey=16)
array[i]['pflags'] returns the current player flags. (Channel Commander=1,Voice Request=2,Doesnt accept whisper=4,Away=8,Microphone muted=16,Sound muted=32,Recording=64)
array[i]['ip'] returns the IP of the user
array[i]['nick'] returns the nick of the user
array[i]['loginname'] returns the loginname of the user




Tags:

return:  raw playerlist on success (raw=1), parsed serverlist as array (raw=0), FALSE on failure


Parameters:

integer   $port   Port of the Server
integer   $raw   raw (1) or parsed (0) list (default=0)

[ Top ]

method getserverinfo [line 234]

mixed getserverinfo( integer $port, [integer $raw = 0])

Get serverinformation from a specified port

parsed list:
array['server_id'] returns the serverid
array['server_name'] returns the servername
array['server_platform'] returns the serverplatform
array['server_welcomemessage'] returns the welcomemessage
array['server_webpost_linkurl'] returns the webpost linkurl
array['server_webpost_posturl'] returns the webpost posturl
array['server_password'] returns 1 if a password is set, and 0 is none is set
array['server_clan_server'] returns 1 if the servermode is clanserver or 0 if its set to publicserver
array['server_udpport'] returns the port of the server
array['server_maxusers'] returns the amount of maximum users
array['server_allow_codec_celp51'] returns -1 if celp51 codec is allowed and 0 if not
array['server_allow_codec_celp63'] returns -1 if celp63 codec is allowed and 0 if not
array['server_allow_codec_gsm148'] returns -1 if gsm148 codec is allowed and 0 if not
array['server_allow_codec_gsm164'] returns -1 if gsm164 codec is allowed and 0 if not
array['server_allow_codec_windowscelp52'] returns -1 if windowscelp52 codec is allowed and 0 if not
array['server_allow_codec_speex2150'] returns -1 if speex2150 codec is allowed and 0 if not
array['server_allow_codec_speex3950'] returns -1 if speex3950 codec is allowed and 0 if not
array['server_allow_codec_speex5950'] returns -1 if speex5950 codec is allowed and 0 if not
array['server_allow_codec_speex8000'] returns -1 if speex8000 codec is allowed and 0 if not
array['server_allow_codec_speex11000'] returns -1 if speex11000 codec is allowed and 0 if not
array['server_allow_codec_speex15000'] returns -1 if speex15000 codec is allowed and 0 if not
array['server_allow_codec_speex18200'] returns -1 if speex18200 codec is allowed and 0 if not
array['server_allow_codec_speex24600'] returns -1 if speex24600 codec is allowed and 0 if not
array['server_packetssend'] returns the amount of packets the server sent
array['server_bytessend'] returns the amount of bytes the server sent
array['server_packetsreceived'] returns the amount of packets the server received
array['server_bytesreceived'] returns the amount of packets the server received
array['server_uptime'] returns the uptime in seconds
array['server_currentusers'] returns the amount of current users on the server
array['server_currentchannels'] returns the amount of current channels on the server
array['server_bwinlastsec'] returns the amount of bytes received in the last second
array['server_bwoutlastsec'] returns the amount of bytes sent in the last second
array['server_bwinlastmin'] returns the amount of bytes received in the last minute
array['server_bwoutlastmin'] returns the amount of bytes sent in the last minute




Tags:

return:  raw serverinfo on success (raw=1), parsed serverlist as array (raw=0), FALSE on failure


Parameters:

integer   $port   Port of the server
integer   $raw   raw (1) or parsed (0) list (default=0)

[ Top ]

method getserverlist [line 98]

mixed getserverlist( [integer $raw = 0])

Get serverlist from TS-Server

parsed list:
array[i]['id'] returns the serverid
array[i]['port'] returns the port of the server
array[i]['name'] returns the servername
array[i]['online'] returns 1 if the server is started and 0 if the server is stopped




Tags:

return:  raw serverlist on success (raw=1), parsed serverlist as array (raw=0), FALSE on failure


Parameters:

integer   $raw   raw (1) or parsed (0) list (default=0)

[ Top ]

method port2serverid [line 268]

mixed port2serverid( integer $port)

Get Serverid from Port



Tags:

return:  ID of the server, FALSE on failure


Parameters:

integer   $port   Port of the server

[ Top ]

method restartserver [line 326]

bool restartserver( integer $port)

Restarts the specified server



Tags:

return:  TRUE on success, FALSE on failure


Parameters:

integer   $port   Port of the server

[ Top ]

method setmaxusers [line 362]

bool setmaxusers( integer $port, integer $maxusers)

Sets the new maximum userlimit on the specified server



Tags:

return:  TRUE on success, FALSE on failure


Parameters:

integer   $port   Port of the server
integer   $maxusers   New maximum userlimit

[ Top ]

method setpassword [line 338]

bool setpassword( integer $port, string $password)

Sets a servers password



Tags:

return:  TRUE on success, FALSE on failure


Parameters:

integer   $port   Port of the server
string   $password   New password of the server

[ Top ]

method setservername [line 386]

bool setservername( integer $port, string $servername)

Sets the servers name



Tags:

return:  TRUE on sucess, FALSE on failure


Parameters:

integer   $port   Port of the server
string   $servername   New name of the server (Up to 29 characters)

[ Top ]

method startserver [line 284]

bool startserver( integer $port)

Starts the specified server



Tags:

return:  TRUE on success, FALSE on failure


Parameters:

integer   $port   Port of the server

[ Top ]

method stopserver [line 302]

bool stopserver( integer $port)

Stops the specified server



Tags:

return:  TRUE on success, FALSE on failure


Parameters:

integer   $port   Port of the server

[ Top ]


Documentation generated on Fri, 14 Jan 2005 13:59:59 +0100 by phpDocumentor 1.2.3