Subversion Repositories qbpwcf-lib(archive)

Rev

Rev 924 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 liveuser 1
#!/usr/bin/php
2
<?php
3
 
464 liveuser 4
/*
5
	QBPWCF, Quick Build PHP website Component base on Fedora Linux.
621 liveuser 6
    Copyright (C) 2015~2024 Min-Jhin,Chen
464 liveuser 7
 
8
    This file is part of QBPWCF.
9
 
10
    QBPWCF is free software: you can redistribute it and/or modify
11
    it under the terms of the GNU General Public License as published by
12
    the Free Software Foundation, either version 3 of the License, or
13
    (at your option) any later version.
14
 
15
    QBPWCF is distributed in the hope that it will be useful,
16
    but WITHOUT ANY WARRANTY; without even the implied warranty of
17
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
    GNU General Public License for more details.
19
 
20
    You should have received a copy of the GNU General Public License
21
    along with QBPWCF.  If not, see <http://www.gnu.org/licenses/>.
22
 
23
*/
24
 
1 liveuser 25
#使用命名空間qbpwcf
26
namespace qbpwcf;
27
 
955 liveuser 28
#取得 lib path
29
exec("php -f ".escapeshellarg(pathinfo(__FILE__)["dirname"]."/libexec/folderOfUsrLib.php"),$output,$status);
30
 
31
#如果執行失敗
32
if($status!==0){
33
 
34
	#debug
35
	var_dump(__LINE__,$output);
36
 
37
	#結束執行,回傳shell 1.
38
	exit(1);
39
 
40
	}#if end
41
 
42
#儲存lib path
43
$folderOfUsrLib=$output[0];
44
 
466 liveuser 45
#以該檔案的實際位置的 lib path 為 include path 首位
955 liveuser 46
$output=array();
47
exec("cd ".escapeshellarg(pathinfo(__FILE__)["dirname"]."/../".$folderOfUsrLib."/qbpwcf").";pwd;",$output,$status);
48
 
49
#如果執行失敗
50
if($status!==0){
51
 
52
	#debug
53
	var_dump(__LINE__,$output);
54
 
55
	#結束執行,回傳shell 1.
56
	exit(1);
57
 
58
	}#if end
59
 
60
#設置 include path 
466 liveuser 61
set_include_path($output[0].PATH_SEPARATOR.get_include_path());
62
 
1 liveuser 63
#匯入外部套件
466 liveuser 64
include("allInOne.php");
1 liveuser 65
 
66
#說明
67
function help()
68
{
69
	#說明
70
	echo "尋找BBB會議室的錄影檔案資訊".PHP_EOL;
71
	echo $_SERVER['argv'][0]." [bbb meeting ID]".PHP_EOL;
72
}
73
 
74
#如果不存在要轉換成16進位的數值
75
if( !isset($_SERVER['argv'][1]) )
76
{
77
	#show help
78
	help();
79
 
80
	#停止執行
81
	exit;
82
}
83
 
84
#如果第參數為 "help" 或 "-h"
85
if( $_SERVER['argv'][1]==="help" || $_SERVER['argv'][1]==="-h" )
86
{
87
	#show help
88
	help();
89
 
90
	#停止執行
91
	exit;
92
 
93
}#if end
94
 
95
#取得會議室ID
96
$meetingID=$_SERVER['argv'][1];
97
 
98
#函式說明:
99
#取得會議室的錄影資料
100
#回傳結果:
101
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
102
#$reuslt["error"],執行不正常結束的錯訊息陣列.
103
#$result["function"],當前執行的函式名稱.
104
#$result["requestUrl"],要求的網址.
105
#$result["content"],回應的xml物件.
106
#$result["xml"],回應的xml格式內容.
107
#必填參數:
108
#$conf["fileArgu"],字串,變數__FILE__的內容.
109
$conf["fileArgu"]=__FILE__;
110
#$conf["bbbUrl"],字串,提供bbb服務的主機名稱.
111
$conf["bbbUrl"]=bbbUrl;
112
#$conf["sharedSecret"],字串,SharedSecret.
113
$conf["SharedSecret"]=bbbSecret;
114
#可省略參數:
115
#$conf["meetingID"],字串,會議室識別碼,有的話可以找特定的會議室錄影資料.
116
$conf["meetingID"]=$meetingID;
117
#$conf["recordID"],字串,有的話可以指定要找的特定一個錄影.
118
#$conf["recordID"]="";
119
#參考資料:
120
#https://docs.bigbluebutton.org/dev/api.html#getrecordings
121
#備註:
122
#建構中.
123
$getRecord=bigbluebutton::getRecord($conf);
124
unset($conf);
125
 
126
#如果執行錯誤
127
if($getRecord["status"]==="false"){
128
 
129
	#印出結果
130
	var_dump($getRecord);
131
 
132
	#結束執行
133
	exit;
134
 
135
	}#if end
136
 
137
#印出結果
138
var_dump($getRecord);
139
 
140
?>