Subversion Repositories qbpwcf-lib(archive)

Rev

Rev 621 | Rev 906 | Go to most recent revision | 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
 
466 liveuser 28
#以該檔案的實際位置的 lib path 為 include path 首位
29
exec("cd ".pathinfo(__FILE__)["dirname"]."/../../;pwd;",$output,$status);
30
set_include_path($output[0].PATH_SEPARATOR.get_include_path());
31
 
1 liveuser 32
#匯入外部套件
466 liveuser 33
include("allInOne.php");
1 liveuser 34
 
35
#說明
36
function help()
37
{
38
	#說明
39
	echo "尋找BBB會議室的錄影檔案資訊".PHP_EOL;
40
	echo $_SERVER['argv'][0]." [bbb meeting ID]".PHP_EOL;
41
}
42
 
43
#如果不存在要轉換成16進位的數值
44
if( !isset($_SERVER['argv'][1]) )
45
{
46
	#show help
47
	help();
48
 
49
	#停止執行
50
	exit;
51
}
52
 
53
#如果第參數為 "help" 或 "-h"
54
if( $_SERVER['argv'][1]==="help" || $_SERVER['argv'][1]==="-h" )
55
{
56
	#show help
57
	help();
58
 
59
	#停止執行
60
	exit;
61
 
62
}#if end
63
 
64
#取得會議室ID
65
$meetingID=$_SERVER['argv'][1];
66
 
67
#函式說明:
68
#取得會議室的錄影資料
69
#回傳結果:
70
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
71
#$reuslt["error"],執行不正常結束的錯訊息陣列.
72
#$result["function"],當前執行的函式名稱.
73
#$result["requestUrl"],要求的網址.
74
#$result["content"],回應的xml物件.
75
#$result["xml"],回應的xml格式內容.
76
#必填參數:
77
#$conf["fileArgu"],字串,變數__FILE__的內容.
78
$conf["fileArgu"]=__FILE__;
79
#$conf["bbbUrl"],字串,提供bbb服務的主機名稱.
80
$conf["bbbUrl"]=bbbUrl;
81
#$conf["sharedSecret"],字串,SharedSecret.
82
$conf["SharedSecret"]=bbbSecret;
83
#可省略參數:
84
#$conf["meetingID"],字串,會議室識別碼,有的話可以找特定的會議室錄影資料.
85
$conf["meetingID"]=$meetingID;
86
#$conf["recordID"],字串,有的話可以指定要找的特定一個錄影.
87
#$conf["recordID"]="";
88
#參考資料:
89
#https://docs.bigbluebutton.org/dev/api.html#getrecordings
90
#備註:
91
#建構中.
92
$getRecord=bigbluebutton::getRecord($conf);
93
unset($conf);
94
 
95
#如果執行錯誤
96
if($getRecord["status"]==="false"){
97
 
98
	#印出結果
99
	var_dump($getRecord);
100
 
101
	#結束執行
102
	exit;
103
 
104
	}#if end
105
 
106
#印出結果
107
var_dump($getRecord);
108
 
109
?>