-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdestinychat.php
More file actions
287 lines (266 loc) · 12 KB
/
destinychat.php
File metadata and controls
287 lines (266 loc) · 12 KB
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<?php
$stream = strip_tags(trim($_GET['stream']));
$s = strip_tags(strtolower(trim($_GET['s'])));
$t = strip_tags(strtolower(trim($_GET['t'])));
//what the fuck, go use destiny's website for this FeedNathan
if(strtolower($stream) == "destiny")
{
header('Location: http://destiny.gg/bigscreen');
}
//set the default stream time to twitch
if($s == "")
{
$s = "twitch";
}
//set the page default
if($stream == "" && $s == "twitch" && $t == "")
{
$stream = "kaceytron";
}
//if no time is set start from the beginning
if($t == "")
{
$t = "0";
}
?>
<!--
GitHub can be found at https://github.com/ILiedAboutCake/OverRustle
This site is run by ILiedAboutCake in destiny.gg chat. Pls bitch at him with all your problems Kappa.
Copyright >2014 pls no copypasterino source code without credit
WellRight
ToBearArmsLOL,hon
estly,IthinkImighttalkto
Stevenaboutyour oddrheto
ric.Thischati sdefini
telyanintegralp arttoh
isstreamandyouar esull
yingitbytel lingme andmanyothe rstok
illthemselves.You'v egotsomemajorpr oble
msandIworrytheyar enevergoingtobesolved
ifyou loiterhere, lettingotherpeople'ss
adnessandderisioninc ulcateyouro wnbittern
ess.Becausenewsflas h!:NoonelikesyouWellR
ightToBearArmsLOL,honestly,IthinkImi ghtta
lktoS tevenaboutyouroddr hetori
c.Thi schatis defini
telyan integr
alpart tohiss
treama ndyoua
resul lyin gitbyt
elli ngmea ndm anyoth
erst okillthems elves .You'vego
tsome majorprob lemsa ndIworrythey
arene vergoingto besol vedify oulo
iterh ere,letti ngoth erpeopl e'ssa
dness andderisi onincu lcateyo urown
bitte rness.Be causenewsflash!:Noon elikesy ouWel
lRig htToBear ArmsLOL,honestly,IthinkImigh ttalk
toSt evenabo utyou roddr hetoric.Th ischat
isde finitely ani ntegralparttohiss treama
ndyou aresu llyin gitbytellingmeandm anyothe
rsto killt hemselv es.You'vegotsomemaj orproble
msand Iworrytheyaren evergoin gtobesolv
edify ouloiterhere ,let tingot herp eople
'ssadn essa ndde rision inculcat
eyouro wnb itter ness
.Because news flash !:No
onelike syou WellRightToBea
rAr msLOL,hone stly ,IthinkImightta
lktoSte venaboutyouroddrh eto ric.Thi s
chatisdefinite lyanintegralparttohis stre amandyo
uare sullyingitbyte llingmeandmanyo therstokillthemselves
.You 'vegotsome majorproble msandIworrytheyaren
ever goingt obesolvedify ouloi terhere,let
tingotherp eople'ssadn essa
ndderis ionincul cate
you rownbi tter
ness.B ecau
senewsflas
h!:Noon
eli
-->
<html>
<head>
<title>Destiny.gg chat + <?php echo $stream; ?></title>
<link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="OverRustle.com" />
<link rel="stylesheet" href="/lib/bootstrap.min.css">
<link rel="shortcut icon" href="/favicon.ico" />
<script src="socket.io/socket.io.js"></script>
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<style>
.container-full
{
margin: 0 auto;
padding: 0;
width: 100%;
}
.stream-box
{
width: -moz-calc(100% - 390px);
width: -webkit-calc(100% - 390px);
width: -o-calc(100% - 390px);
width: calc(100% - 390px);
}
.give-header
{
height: -moz-calc(100% - 30px);
height: -webkit-calc(100% - 30px);
height: -o-calc(100% -30px);
height: calc(100% - 30px);
}
.header
{
width: 100%;
height: 30px;
background-color: #262626;
color: #F1F1F1;
line-height: 30px;
}
a
{
color: #F1F1F1;
}
select, input
{
color: black;
}
input, form
{
margin: 0 auto;
padding: 0;
}
input
{
line-height: 15px;
}
body
{
background-color: #000000; /* BasedGod */
}
</style>
<!-- Google Analytics, Don't get rustled I don't harvest IPs or anything -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-49711133-1', 'overrustle.com');
ga('send', 'pageview');
</script>
<!-- ajax code to pull down viewer numbers -->
<script>
function twitchAPI() {
$.ajax({
url: "https://api.twitch.tv/kraken/streams/<?php echo $stream; ?>?callback=?",
jsonp: "callback",
dataType: "jsonp",
data: {
format: "json"
},
success: function(apiData) {
var output = apiData.stream.channel.display_name + " playing " + apiData.stream.game + " with " + apiData.stream.viewers + " viewers";
document.getElementById("twitch-ajax").innerHTML = output;
}
});
}
</script>
<script>
var socket = io.connect('http://overrustle.com:9998');
socket.on('notification', function (returned) {
var pushData = JSON.parse(returned);
//var pushOutput = "Server Broadcast: " + pushData.info.text + " <a href=\"" + pushData.info.link + " \">See it now!</a>";
//document.getElementById("server-broadcast").innerHTML = pushOutput;
});
</script>
</head>
<body>
<div class="container-full">
<div class="text-center header">
<div class="pull-left">
<?php
if ($s == "twitch")
{
echo '<div id="twitch-ajax">Waiting for Twitch API to respond...</a></div><script>twitchAPI(); window.setInterval(function(){twitchAPI()}, 60000);</script>';
}
else
{
echo 'Watch videos while chatting in <a href="http://destiny.gg/">destiny.gg</a>!';
}
?>
</div>
<div class="pull-right">
<form action="destinychat">
Player:
<select name="s">
<option value="twitch">Twitch</option>
<option value="twitch-vod">Twitch - VOD</option>
<option value="hitbox">Hitbox</option>
<option value="castamp">CastAmp</option>
<option value="youtube">Youtube</option>
<option value="mlg">MLG (Beta*)</option>
<option value="ustream">Ustream (Beta*)</option>
<option value="dailymotion">Dailymotion</option>
<option value="advanced">Advanced</option>
</select>
Stream/ID:
<input type="text" name="stream" />
</form>
</div>
<div id="server-broadcast">
<?php if($s == "castamp") echo "Castamp Bug: Refresh page if you resize your window."; ?>
</div>
</div>
<div class="text-center pull-left stream-box give-header">
<?php
switch($s)
{
case "twitch":
echo '<iframe width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" src="http://www.twitch.tv/' . $stream . '/embed" scrolling="no"></iframe>';
break;
case "twitch-vod":
echo "
<object data='http://www.twitch.tv/widgets/archive_embed_player.swf' id='clip_embed_player_flash' type='application/x-shockwave-flash' width='100%' height='100%'>
<param name='movie' value='http://www.twitch.tv/widgets/archive_embed_player.swf' />
<param name='allowScriptAccess' value='always' />
<param name='allowNetworking' value='all' />
<param name='allowFullScreen' value='true' />
<param name='flashvars' value='initial_time=" . $t . "&start_volume=25&auto_play=true&archive_id=" . $stream . "' />
</object>";
break;
case "advanced":
echo '<iframe width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" src="' . $stream . '" scrolling="yes"></iframe>';
break;
case "castamp":
if (strlen(strstr($_SERVER['HTTP_USER_AGENT'], 'Firefox')) > 0)
{
echo '<script type="text/javascript"> channel="' . $stream . '"; vwidth="1280"; vheight="720";</script><script type="text/javascript" src="http://castamp.com/embed.js"></script>';
}
else
{
echo '<script type="text/javascript"> channel="' . $stream . '";</script><script type="text/javascript" src="castamp.js"></script>';
}
break;
case "hitbox":
echo '<iframe width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" src="http://www.hitbox.tv/embed/' . $stream . '?autoplay=true" scrolling="no"></iframe>';
break; //stop fucking asking, I'm not going to add azubu TV. It's shit and so are you for thinking about it
case "youtube":
echo '<iframe width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" src="http://www.youtube.com/embed/' . $stream . '?autoplay=1&start=' . $t . '" scrolling="no"></iframe>';
break;
case "mlg":
echo '<iframe width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" src="http://www.teamliquid.net/video/streams/' . $stream . '/popout" scrolling="no"></iframe>';
break;
case "ustream":
echo '<iframe width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" src="http://www.ustream.tv/embed/' . $stream . '?v=3&wmode=direct&autoplay=true" scrolling="no"></iframe>';
break;
case "dailymotion":
echo '<iframe width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" src="http://www.dailymotion.com/embed/video/' . $stream . '" scrolling="no"></iframe>';
break;
}
?>
</div>
<div class="text-center pull-right give-header" style="width: 390px;">
<iframe width="100%" height="100%" marginheight="0" marginwidth="0" frameborder="0" src="http://destiny.gg/embed/chat" scrolling="no"></iframe>
</div>
</div>
</body>
</html>