3 require_once('lib/lib.php');
8 var $adobe_connect_host;
9 var $adobe_connect_port;
10 var $adobe_connect_adminuser;
11 var $adobe_connect_adminpass;
12 var $adobe_connect_folderid;
15 public function __construct() {
17 $cfg = getAdobeConnectConfig();
19 foreach ($cfg as $attribute => $v) {
20 $this->$attribute = $cfg->$attribute;
26 public function getACHost() {
27 return $this->adobe_connect_host;
31 public function getACPort() {
32 return $this->adobe_connect_port;
36 public function getAdminSession() {
38 $fp = @fsockopen($this->adobe_connect_host, $this->adobe_connect_port);
43 $url = '/api/xml?action=login&external-auth=use';
45 fputs($fp, "GET ".$url." HTTP/1.0\r\n".$this->adobe_connect_adminpass.":".$this->adobe_connect_adminuser."\r\nHost: ".$this->adobe_connect_host."\r\n\r\n");
47 while ($line = fgets($fp)) {
48 if (strstr($line, "code=\"ok\"")) {
53 if (preg_match('/BREEZESESSION=(.*)\;/', $line, $result)) {
54 $session = explode(';', $result[1]);
55 $sessionid = $session[0];
60 if (empty($response)) {
68 public function checkResponse($socket, $source) {
70 while ($line = fgets($socket)) {
71 if (strstr($line, "code=\"ok\"")) {