trouble with the status.xml, please enlighten me :)
trouble with the status.xml, please enlighten me :)
Hey there, i just installed steamcast and it rocks simoultaniously (did i spell that right?) a video and sound stream. YAY!
BUT! now im working on a mod for my website using your status.xml
im wondering: how do i add a tunein button to it. I could just hardcode the url. but then if the stream isnt online it still shows the button, and if i have 2 streams online the 2nd wouldnt be right :S (you know what i mean)
ive been trying to get it from the xml but am not sure how to do this i tried
$val[\'MOUNT\'] and such but to no avail...
so whats the key word
[edit]
also im trying to figure out which variable is set to be to true or false or something if a stream exists or not.
Im trying to make it so that the mod is not showing if no stream is active
like
[end edit]
Thanks in advance!
PS. (if rava reads this) why is it everywhere i go and shoutcast or streaming stuff is involved i see your name coming up, lol
BUT! now im working on a mod for my website using your status.xml
im wondering: how do i add a tunein button to it. I could just hardcode the url. but then if the stream isnt online it still shows the button, and if i have 2 streams online the 2nd wouldnt be right :S (you know what i mean)
ive been trying to get it from the xml but am not sure how to do this i tried
$val[\'MOUNT\'] and such but to no avail...
so whats the key word
[edit]
also im trying to figure out which variable is set to be to true or false or something if a stream exists or not.
Im trying to make it so that the mod is not showing if no stream is active
like
Code: Select all
if($this == true) {
//show mod
}
Thanks in advance!
PS. (if rava reads this) why is it everywhere i go and shoutcast or streaming stuff is involved i see your name coming up, lol
how do i use that in php?
im not to good with arrays :S
im not to good with arrays :S
Code: Select all
include "mods/steamcast.php";
if($val['STATUS']==1) {
print "<tr><td class='headline'><b>Audio/video</b></td></tr>\n";
while(list($key, $val) = each($sources)){
print "<tr><td class='leftrow' align='center'>
<b><a href='".$val['URL']."' target='_blank'>".$val['NAME']."</a></b>
<br>Uptime: ".floor(((($st - $val['CONNECT_TIME'])/60)/60)/24)."d ".
(((($st - $val['CONNECT_TIME'])/60)/60)%24)."h ".
((($st - $val['CONNECT_TIME'])/60)%60)."m ".
(($st - $val['CONNECT_TIME'])%60)."s
<br>Listeners: ".$val['NODES']."/".$val['MAX_NODES']."<br></td></tr>";
}
}