39 protected $default_host =
"update.teamspeak.com";
46 protected $default_port = 17384;
53 protected $build_datetimes = null;
60 protected $version_strings = null;
71 if(!isset($this->options[
"host"]) || empty($this->options[
"host"])) $this->options[
"host"] = $this->default_host;
72 if(!isset($this->options[
"port"]) || empty($this->options[
"port"])) $this->options[
"port"] = $this->default_port;
74 $this->
initTransport($this->options,
"TeamSpeak3_Transport_UDP");
75 $this->transport->setAdapter($this);
81 if(!preg_match_all(
"/,?(\d+)#([0-9a-zA-Z\._-]+),?/", $this->
getTransport()->read(96), $matches) || !isset($matches[1]) || !isset($matches[2]))
86 $this->build_datetimes = $matches[1];
87 $this->version_strings = $matches[2];
119 public function getRev($channel =
"stable")
124 return isset($this->build_datetimes[0]) ? $this->build_datetimes[0] : null;
127 return isset($this->build_datetimes[1]) ? $this->build_datetimes[1] : null;
130 return isset($this->build_datetimes[2]) ? $this->build_datetimes[2] : null;
133 return isset($this->build_datetimes[3]) ? $this->build_datetimes[3] : null;
158 return isset($this->version_strings[0]) ? $this->version_strings[0] : null;
161 return isset($this->version_strings[1]) ? $this->version_strings[1] : null;
164 return isset($this->version_strings[2]) ? $this->version_strings[2] : null;
167 return isset($this->version_strings[3]) ? $this->version_strings[3] : null;
182 return $this->
getRev(
"stable");
193 return $this->
getRev(
"server");