-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcheck.php
160 lines (105 loc) · 4.97 KB
/
check.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!doctype html>
<html>
<?php
$loggedin = 0;
$loginUrl ="";
$errortype="";
$advancedinfo = "hidden";
include "header.php";
include "login.php";
$token = ($_SESSION[fb_token]);
?>
</ul>
</div>
</div>
</div>
<?php
if (!empty($_GET[eventid])) {
try {
$livevideo = $fb->get('/' . $_GET[eventid] . '?fields=id,title,description,stream_url,secure_stream_url,status')->getGraphNode()->asArray();
} catch(\Facebook\Exceptions\FacebookResponseException $e) {
$errortype="Graph API";
include "error.php";
exit;
} catch(\Facebook\Exceptions\FacebookSDKException $e) {
$errortype="SDK";
include "error.php";
exit;
}
?>
<div class='content'>
<h2 class="content-head is-center">Go Live</h2>
<div class="infobox"
<label class="pure-form">
If your video is still UNPUBLISHED please check if you are transmitting. The status should be LIVE. If your have ended your Livestream the status will be PROCESSING or VOD.
</label></div>
<label class="copylabel" for="status">Status</label>
<div class="status"
<?php
if($livevideo[status] == "UNPUBLISHED") {
echo "><i class='fas fa-exclamation-circle'></i> NOT LIVE";
}
elseif ($livevideo[status] == "LIVE") {
echo "style='color: red';> <i class='far fa-dot-circle'></i> LIVE";
} else {
echo ">" . $livevideo[status];
}
?>
</div>
<label class="copylabel" for="rtmplink">RTMP Link</label>
<div class="input-group">
<input class="copyinput" type="text" name="rtmplink" id="rtmplink" value="<?php echo $livevideo[stream_url] ?>" readonly="readonly">
<span class="input-group-button">
<button class="pure-button ctc-button" type="button" data-clipboard-target="#rtmplink">
<i class="fas fa-clipboard-list"></i> Copy to Clipboard
</button>
</span>
</div>
<label class="copylabel" for="rtmpslink">RTMPS Link</label>
<div class="input-group">
<input class="copyinput" type="text" name="rtmpslink" id="rtmpslink" value="<?php echo $livevideo[secure_stream_url] ?>" readonly="readonly">
<span class="input-group-button">
<button class="pure-button ctc-button" type="button" data-clipboard-target="#rtmpslink">
<i class="fas fa-clipboard-list"></i> Copy to Clipboard
</button>
</span>
</div>
<label class="copylabel" for="serverurl">Server URL</label>
<div class="input-group">
<input class="copyinput" type="text" name="serverurl" id="serverurl" value="Parser not yet implemented" readonly="readonly">
<span class="input-group-button">
<button class="pure-button ctc-button" type="button" data-clipboard-target="#serverurl">
<i class="fas fa-clipboard-list"></i> Copy to Clipboard
</button>
</span>
</div>
<label class="copylabel" for="streamkey">Stream Key</label>
<div class="input-group">
<input class="copyinput" type="text" name="streamkey" id="streamkey" value="Parser not yet implemented" readonly="readonly">
<span class="input-group-button">
<button class="pure-button ctc-button" type="button" data-clipboard-target="#streamkey">
<i class="fas fa-clipboard-list"></i> Copy to Clipboard
</button>
</span>
</div>
<form class="pure-form pure-form-stacked">
<label for="eventid">Live Video ID</label>
<input type="text" name="eventid" id="eventid" value="<?php echo $livevideo[id] ?>" readonly="readonly">
<label for="title">Title</label>
<input type="text" name="title" id="title" value="<?php echo $livevideo[title] ?>" readonly="readonly">
<label for="description">Description</label>
<input type="text" name="description" id="description" value="<?php echo $livevideo[description] ?>" readonly="readonly">
<label for="page" hidden>Page</label>
<input type="text" name="page" id="page" value="<?php echo $_POST[page] ?>" readonly="readonly" hidden>
<label for="pageid" hidden>Page ID</label>
<input type="text" name="pageid" id="pageid" value="<?php echo $_POST[pageid] ?>" readonly="readonly" hidden>
</form>
<a href="./check.php?eventid=<?php echo $livevideo[id] ?>"> <button type="submit" class="pure-button button-create" > <i class="fas fa-video"></i> Check Status</button></a>
</div>
<?php
}
else {
//Not event id provided, redirecting to Home
header('Location: ./');
}
?>