ok im looking now
for a start no v2 shoutcast here
radiostats/shoutcast.class
PHP Code:
<?php
/*******************************************************************
* shoutcast.class.php
* Version: 0.1
* Author: Henrik Malmberg
* Copyright (C) 2002, Henrik Malmberg
* henrik@ih.nut
* http://yoda.ih.nu/
*
*******************************************************************
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*******************************************************************/
class ShoutCast {
// Public
var $host;
var $port;
var $passwd;
//Private
var $_xml;
var $_error;
function openstats() {
$fp = @fsockopen($this->host, $this->port, $errno, $errstr, 10);
If (!$fp) {
$this->_error = "$errstr ($errno)";
return(0);
} else {
fputs($fp, "GET /admin.cgi?pass=".$this->passwd."&mode=viewxml HTTP/1.0\r\n");
fputs($fp, "User-Agent: Mozilla\r\n\r\n");
while (!feof($fp)) {
$this->_xml .= fgets($fp, 512);
}
fclose($fp);
if (stristr($this->_xml, "HTTP/1.0 200 OK") == true) {
// <-H> Thanks to Blaster for this fix.. trim();
$this->_xml = trim(substr($this->_xml, 42));
} else {
$this->_error = "Bad login";
return(0);
}
$xmlparser = xml_parser_create();
if (!xml_parse_into_struct($xmlparser, $this->_xml, $this->_values, $this->_indexes)) {
$this->_error = "Unparsable XML";
return(0);
}
xml_parser_free($xmlparser);
return(1);
}
}
function GetCurrentListenersCount() {
return($this->_values[$this->_indexes["CURRENTLISTENERS"][0]]["value"]);
}
function GetPeakListenersCount() {
return($this->_values[$this->_indexes["PEAKLISTENERS"][0]]["value"]);
}
function GetMaxListenersCount() {
return($this->_values[$this->_indexes["MAXLISTENERS"][0]]["value"]);
}
function GetReportedListenersCount() {
return($this->_values[$this->_indexes["REPORTEDLISTENERS"][0]]["value"]);
}
function GetAverageListenTime() {
return($this->_values[$this->_indexes["AVERAGETIME"][0]]["value"]);
}
function GetServerGenre() {
return($this->_values[$this->_indexes["SERVERGENRE"][0]]["value"]);
}
function GetServerURL() {
return($this->_values[$this->_indexes["SERVERURL"][0]]["value"]);
}
function GetServerTitle() {
return($this->_values[$this->_indexes["SERVERTITLE"][0]]["value"]);
}
function GetCurrentSongTitle() {
return($this->_values[$this->_indexes["SONGTITLE"][0]]["value"]);
}
function GetIRC() {
return($this->_values[$this->_indexes["IRC"][0]]["value"]);
}
function GetAIM() {
return($this->_values[$this->_indexes["AIM"][0]]["value"]);
}
function GetICQ() {
return($this->_values[$this->_indexes["ICQ"][0]]["value"]);
}
function GetWebHitsCount() {
return($this->_values[$this->_indexes["WEBHITS"][0]]["value"]);
}
function GetStreamHitsCount() {
return($this->_values[$this->_indexes["STREAMHITS"][0]]["value"]);
}
function GetStreamStatus() {
return($this->_values[$this->_indexes["STREAMSTATUS"][0]]["value"]);
}
function GetBitRate() {
return($this->_values[$this->_indexes["BITRATE"][0]]["value"]);
}
function GetSongHistory() {
for($i=1;$i<sizeof($this->_indexes['TITLE']);$i++) {
$arrhistory[$i-1] = array(
"playedat"=>$this->_values[$this->_indexes['PLAYEDAT'][$i]]['value'],
"title"=>$this->_values[$this->_indexes['TITLE'][$i]]['value']
);
}
return($arrhistory);
}
function GetListeners() {
for($i=0;$i<sizeof($this->_indexes['USERAGENT']);$i++) {
$arrlisteners[$i] = array(
"hostname"=>$this->_values[$this->_indexes['HOSTNAME'][$i]]['value'],
"useragent"=>$this->_values[$this->_indexes['USERAGENT'][$i]]['value'],
"underruns"=>$this->_values[$this->_indexes['UNDERRUNS'][$i]]['value'],
"connecttime"=>$this->_values[$this->_indexes['CONNECTTIME'][$i]]['value'],
"pointer"=>$this->_values[$this->_indexes['POINTER'][$i]]['value'],
"uid"=>$this->_values[$this->_indexes['UID'][$i]]['value'],
);
}
return($arrlisteners);
}
function geterror() { return($this->_error); }
}
?>
there is quite a few more files to edit
ill post up when done
this is the error your getting in the tools why no shoutcast v2 nor sid
$this->_error = "Bad login";
ill need the DB to add the sid so on
So it looks like this just a test
PHP Code:
<?php
/*******************************************************************
* shoutcast.class.php
* Version: 0.1
* Author: Henrik Malmberg
* Copyright (C) 2002, Henrik Malmberg
* henrik@ih.nut
* http://yoda.ih.nu/
*
*******************************************************************
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*******************************************************************/
class ShoutCast {
// Public
var $host;
var $port;
var $passwd;
//Private
var $_xml;
var $_error;
function openstats() {
$fp = @fsockopen($this->host, $this->port, $errno, $errstr, 10);
If (!$fp) {
$this->_error = "$errstr ($errno)";
return(0);
} else {
///TEST BY NAPON
if ($this->sid==0)
fputs($fp, "GET /admin.cgi?pass=".$this->passwd."&mode=viewxml HTTP/1.0\r\n");
else
fputs($fp, "GET /admin.cgi?sid=".$this->sid."&pass=".$this->passwd."&mode=viewxml HTTP/1.1\r\n");
//fputs($fp, "GET /admin.cgi?pass=".$this->passwd."&mode=viewxml HTTP/1.0\r\n");
//fputs($fp, "User-Agent: Mozilla\r\n\r\n");
while (!feof($fp)) {
$this->_xml .= fgets($fp, 512);
}
fclose($fp);
if (stristr($this->_xml, "HTTP/1.0 200 OK") == true) {
// <-H> Thanks to Blaster for this fix.. trim();
$this->_xml = trim(substr($this->_xml, 42));
} else {
$this->_error = "Bad login";
return(0);
}
$xmlparser = xml_parser_create();
if (!xml_parse_into_struct($xmlparser, $this->_xml, $this->_values, $this->_indexes)) {
$this->_error = "Unparsable XML";
return(0);
}
xml_parser_free($xmlparser);
return(1);
}
}
function GetCurrentListenersCount() {
return($this->_values[$this->_indexes["CURRENTLISTENERS"][0]]["value"]);
}
function GetPeakListenersCount() {
return($this->_values[$this->_indexes["PEAKLISTENERS"][0]]["value"]);
}
function GetMaxListenersCount() {
return($this->_values[$this->_indexes["MAXLISTENERS"][0]]["value"]);
}
function GetReportedListenersCount() {
return($this->_values[$this->_indexes["REPORTEDLISTENERS"][0]]["value"]);
}
function GetAverageListenTime() {
return($this->_values[$this->_indexes["AVERAGETIME"][0]]["value"]);
}
function GetServerGenre() {
return($this->_values[$this->_indexes["SERVERGENRE"][0]]["value"]);
}
function GetServerURL() {
return($this->_values[$this->_indexes["SERVERURL"][0]]["value"]);
}
function GetServerTitle() {
return($this->_values[$this->_indexes["SERVERTITLE"][0]]["value"]);
}
function GetCurrentSongTitle() {
return($this->_values[$this->_indexes["SONGTITLE"][0]]["value"]);
}
function GetIRC() {
return($this->_values[$this->_indexes["IRC"][0]]["value"]);
}
function GetAIM() {
return($this->_values[$this->_indexes["AIM"][0]]["value"]);
}
function GetICQ() {
return($this->_values[$this->_indexes["ICQ"][0]]["value"]);
}
function GetWebHitsCount() {
return($this->_values[$this->_indexes["WEBHITS"][0]]["value"]);
}
function GetStreamHitsCount() {
return($this->_values[$this->_indexes["STREAMHITS"][0]]["value"]);
}
function GetStreamStatus() {
return($this->_values[$this->_indexes["STREAMSTATUS"][0]]["value"]);
}
function GetBitRate() {
return($this->_values[$this->_indexes["BITRATE"][0]]["value"]);
}
function GetSongHistory() {
for($i=1;$i<sizeof($this->_indexes['TITLE']);$i++) {
$arrhistory[$i-1] = array(
"playedat"=>$this->_values[$this->_indexes['PLAYEDAT'][$i]]['value'],
"title"=>$this->_values[$this->_indexes['TITLE'][$i]]['value']
);
}
return($arrhistory);
}
function GetListeners() {
for($i=0;$i<sizeof($this->_indexes['USERAGENT']);$i++) {
$arrlisteners[$i] = array(
"hostname"=>$this->_values[$this->_indexes['HOSTNAME'][$i]]['value'],
"useragent"=>$this->_values[$this->_indexes['USERAGENT'][$i]]['value'],
"underruns"=>$this->_values[$this->_indexes['UNDERRUNS'][$i]]['value'],
"connecttime"=>$this->_values[$this->_indexes['CONNECTTIME'][$i]]['value'],
"pointer"=>$this->_values[$this->_indexes['POINTER'][$i]]['value'],
"uid"=>$this->_values[$this->_indexes['UID'][$i]]['value'],
);
}
return($arrlisteners);
}
function geterror() { return($this->_error); }
}
?>
or this
PHP Code:
<?php
/*******************************************************************
* shoutcast.class.php
* Version: 0.1
* Author: Henrik Malmberg
* Copyright (C) 2002, Henrik Malmberg
* henrik@ih.nut
* http://yoda.ih.nu/
*
*******************************************************************
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*******************************************************************/
class ShoutCast {
// Public
var $host;
var $port;
var $passwd;
//Private
var $_xml;
var $_error;
function openstats() {
$fp = @fsockopen($this->host, $this->port, $errno, $errstr, 10);
If (!$fp) {
$this->_error = "$errstr ($errno)";
return(0);
} else {
///TEST BY NAPON
if ($this->sid==0)
fputs($fp, "GET /admin.cgi?pass=".$this->passwd."&mode=viewxml HTTP/1.0\r\n");
else
fputs($fp, "GET /admin.cgi?sid=".$this->sid."&pass=".$this->passwd."&mode=viewxml HTTP/1.1\r\n");
//fputs($fp, "GET /admin.cgi?pass=".$this->passwd."&mode=viewxml HTTP/1.0\r\n");
//fputs($fp, "User-Agent: Mozilla\r\n\r\n");
while (!feof($fp)) {
$this->_xml .= fgets($fp, 512);
}
fclose($fp);
if (stristr($this->_xml, "HTTP/1.0 200 OK") == true) {
// <-H> Thanks to Blaster for this fix.. trim();
$this->_xml = trim(substr($this->_xml, 42));
} else {
$this->_error = "Bad login";
return(0);
}
$xmlparser = xml_parser_create();
if (!xml_parse_into_struct($xmlparser, $this->_xml, $this->_values, $this->_indexes)) {
$this->_error = "Unparsable XML";
return(0);
}
xml_parser_free($xmlparser);
return(1);
}
}
function GetCurrentListenersCount() {
return($this->_values[$this->_indexes["CURRENTLISTENERS"][0]]["value"]);
}
function GetPeakListenersCount() {
return($this->_values[$this->_indexes["PEAKLISTENERS"][0]]["value"]);
}
function GetMaxListenersCount() {
return($this->_values[$this->_indexes["MAXLISTENERS"][0]]["value"]);
}
function GetReportedListenersCount() {
return($this->_values[$this->_indexes["REPORTEDLISTENERS"][0]]["value"]);
}
function GetAverageListenTime() {
return($this->_values[$this->_indexes["AVERAGETIME"][0]]["value"]);
}
function GetServerGenre() {
return($this->_values[$this->_indexes["SERVERGENRE"][0]]["value"]);
}
function GetServerURL() {
return($this->_values[$this->_indexes["SERVERURL"][0]]["value"]);
}
function GetServerTitle() {
return($this->_values[$this->_indexes["SERVERTITLE"][0]]["value"]);
}
function GetCurrentSongTitle() {
return($this->_values[$this->_indexes["SONGTITLE"][0]]["value"]);
}
function GetIRC() {
return($this->_values[$this->_indexes["IRC"][0]]["value"]);
}
function GetAIM() {
return($this->_values[$this->_indexes["AIM"][0]]["value"]);
}
function GetICQ() {
return($this->_values[$this->_indexes["ICQ"][0]]["value"]);
}
function GetWebHitsCount() {
return($this->_values[$this->_indexes["WEBHITS"][0]]["value"]);
}
function GetStreamHitsCount() {
return($this->_values[$this->_indexes["STREAMHITS"][0]]["value"]);
}
function GetStreamStatus() {
return($this->_values[$this->_indexes["STREAMSTATUS"][0]]["value"]);
}
function GetBitRate() {
return($this->_values[$this->_indexes["BITRATE"][0]]["value"]);
}
function GetSongHistory() {
for($i=1;$i<sizeof($this->_indexes['TITLE']);$i++) {
$arrhistory[$i-1] = array(
"playedat"=>$this->_values[$this->_indexes['PLAYEDAT'][$i]]['value'],
"title"=>$this->_values[$this->_indexes['TITLE'][$i]]['value']
);
}
return($arrhistory);
}
if ($shoutcast->sid>0) {
$v2info="?sid=".$shoutcast->sid;
$v2xtra=":".$shoutcast->sid;
} else {
$v2info="";
$v2xtra="";
}
function GetListeners() {
for($i=0;$i<sizeof($this->_indexes['USERAGENT']);$i++) {
$arrlisteners[$i] = array(
"hostname"=>$this->_values[$this->_indexes['HOSTNAME'][$i]]['value'],
"useragent"=>$this->_values[$this->_indexes['USERAGENT'][$i]]['value'],
"underruns"=>$this->_values[$this->_indexes['UNDERRUNS'][$i]]['value'],
"connecttime"=>$this->_values[$this->_indexes['CONNECTTIME'][$i]]['value'],
"pointer"=>$this->_values[$this->_indexes['POINTER'][$i]]['value'],
"uid"=>$this->_values[$this->_indexes['UID'][$i]]['value'],
);
}
return($arrlisteners);
}
function geterror() { return($this->_error);
}
}
?>
Also you could add this part to the
fetch.php
PHP Code:
if ($shoutcast->sid>0) {
$v2info="?sid=".$shoutcast->sid;
$v2xtra=":".$shoutcast->sid;
} else {
$v2info="";
$v2xtra="";
}
So it looks like this test
PHP Code:
<?php
/////////////////////////////////////////////////////////////////////////////////////
// xbtit - Bittorrent tracker/frontend
//
// Copyright (C) 2004 - 2015 Btiteam
//
// This file is part of xbtitFM.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// 3. The name of the author may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////
include("shoutcast.class.php");
require("../include/functions.php");
dbconn(true);
global $btit_settings, $BASEURL, $TABLE_PREFIX;
$active_seo = get_result("SELECT `activated_user`, `str`, `strto` FROM `{$TABLE_PREFIX}seo` WHERE `id`='1'", true, $btit_settings["cache_duration"]);
$res_seo=$active_seo[0];
// get user's style
$resheet=do_sqlquery("SELECT * FROM {$TABLE_PREFIX}style where id=".$CURUSER["style"]."");
if (!$resheet)
{
$STYLEPATH="$THIS_BASEPATH/style/xbtit_default";
$STYLEURL="$BASEURL/style/xbtit_default";
}
else
{
$resstyle=mysqli_fetch_array($resheet);
$STYLEPATH="$THIS_BASEPATH/".$resstyle["style_url"];
$STYLEURL="$BASEURL/".$resstyle["style_url"];
}
$style_css=load_css("main.css");
function ConvertSeconds($seconds) {
$tmpseconds = substr("00".$seconds % 60, -2);
if ($seconds > 59) {
if ($seconds > 3599) {
$tmphours = substr("0".intval($seconds / 3600), -2);
$tmpminutes = substr("0".intval($seconds / 60 - (60 * $tmphours)), -2);
return ($tmphours.":".$tmpminutes.":".$tmpseconds);
} else {
return ("00:".substr("0".intval($seconds / 60), -2).":".$tmpseconds);
}
} else {
return ("00:00:".$tmpseconds);
}
}
$shoutcast = new ShoutCast();
$shoutcast->host = $btit_settings["radio_ip"];
$shoutcast->port = $btit_settings["radio_port"];
$shoutcast->passwd = $btit_settings["radio_pass"];
if ($shoutcast->sid>0) {
$v2info="?sid=".$shoutcast->sid;
$v2xtra=":".$shoutcast->sid;
} else {
$v2info="";
$v2xtra="";
}
if ($shoutcast->openstats()) {
// We got the XML, gogogo!..
if ($shoutcast->GetStreamStatus()) {
require("../".load_language("lang_shoutcast.php"));
echo"<link rel=\"stylesheet\" type=\"text/css\" href=".$STYLEURL."/main.css\" />";
echo"<table width=100% cellpadding=3 cellspacing=0><tr><td class=blocklist>";
echo "<br><center><img src='radiostats/images/radio-online.png'></center><br><br>";
echo "<table border=0 cellpadding=0 cellspacing=0 align=center class=main>";
$todayis = date ('D');
$timenow = date ('G:i');
$Query = do_sqlquery ('SELECT u.id as realid, sc.uid, sc.activedays, sc.activetime, sc.genre, u.username, g.prefixcolor, g.suffixcolor FROM '.$TABLE_PREFIX.'shoutcastdj sc LEFT JOIN '.$TABLE_PREFIX.'users u ON sc.uid=u.id LEFT JOIN '.$TABLE_PREFIX.'users_level g ON u.id_level=g.id WHERE sc.active = \'1\' ORDER by activetime') OR die ();
if (mysqli_num_rows($Query)>0)
{
$found=0;
while($List=mysqli_fetch_assoc($Query))
{
if (preg_match ('@' . $todayis . '@Ui', $List['activedays']))
{
$timeslot=explode("-",$List["activetime"]);
$start_time=explode(":",$timeslot[0]);
$end_time=explode(":",$timeslot[1]);
$start_timestamp=mktime($start_time[0],$start_time[1],0);
$end_timestamp=mktime((int)$end_time[0],(int)$end_time[1],0);
if(time()>=$start_timestamp && time()<=$end_timestamp)
{
$found=1;
echo "<tr><td class=header><b>".$language['BL_DJ'].":</b></td><td class=lista> <a href='".(($btit_settings["fmhack_SEO_panel"]=="enabled" && $res_seo["activated_user"]=="true")?$List["realid"]."_".strtr($List["username"], $res_seo["str"], $res_seo["strto"]).".html":"index.php?page=userdetails&id=".$List["realid"])."'><b>".unesc($List["prefixcolor"]).$List["username"].unesc($List["suffixcolor"])."</b></a></td></tr>";
}
}
}
if($found==0)
{
$djname=mysqli_real_escape_string($GLOBALS['conn'],$shoutcast->GetServerTitle());
$petr1=do_sqlquery("SELECT `u`.`id`, `ul`.`prefixcolor`, `ul`.`suffixcolor` FROM `{$TABLE_PREFIX}users` `u` LEFT JOIN `{$TABLE_PREFIX}users_level` `ul` ON `u`.`id_level`=`ul`.`id` WHERE `u`.`username`='".$djname."'");
if(@mysqli_num_rows($petr1)>0)
{
$fied=mysqli_fetch_assoc($petr1);
$djname="<a href='".(($btit_settings["fmhack_SEO_panel"]=="enabled" && $res_seo["activated_user"]=="true")?$fied["id"]."_".strtr($djname, $res_seo["str"], $res_seo["strto"]).".html":"index.php?page=userdetails&id=".$fied["id"])."'>".unesc($fied["prefixcolor"] . $djname . $fied["suffixcolor"])."</a>";
}
else
$djname=unesc($djname);
echo "<tr><td class=header><b>".$language['BL_DJ'].":</b></td><td class=lista> <b>".$djname."</b></td></tr>";
}
}
else
{
$djname=mysqli_real_escape_string($GLOBALS['conn'],$shoutcast->GetServerTitle());
$petr1=do_sqlquery("SELECT `u`.`id`, `ul`.`prefixcolor`, `ul`.`suffixcolor` FROM `{$TABLE_PREFIX}users` `u` LEFT JOIN `{$TABLE_PREFIX}users_level` `ul` ON `u`.`id_level`=`ul`.`id` WHERE `u`.`username`='".$djname."'");
if(@mysqli_num_rows($petr1)>0)
{
$fied=mysqli_fetch_assoc($petr1);
$djname="<a href='".(($btit_settings["fmhack_SEO_panel"]=="enabled" && $res_seo["activated_user"]=="true")?$fied["id"]."_".strtr($djname, $res_seo["str"], $res_seo["strto"]).".html":"index.php?page=userdetails&id=".$fied["id"])."'>".unesc($fied["prefixcolor"] . $djname . $fied["suffixcolor"])."</a>";
}
else
$djname=unesc($djname);
echo "<tr><td class=header><b>".$language['BL_DJ'].":</b></td><td class=lista> <b>".$djname."</b></td></tr>";
}
echo "<tr><td class=header><b>".$language['BL_LISTEN'].":</b></td><td class=lista> <br><b><a href='index.php?page=listeners'> (".$shoutcast->GetCurrentListenersCount()." of ".$shoutcast->GetMaxListenersCount()." listeners, peak: ".$shoutcast->GetPeakListenersCount().")</a><p></b></td></tr>";
echo "<tr><td class=header><b>".$language['BL_SONG'].":</b></td><td class=lista> <b>".cut_string($shoutcast->GetCurrentSongTitle(),intval(50))."</b></td></tr>\n";
echo "<tr><td class=header><br><b>".$language['BL_BRATE'].": </b></td><td class=lista><br><b>".$shoutcast->GetBitRate()." kbps <iframe src=\"".$BASEURL."/radioon.php\" width=\"0\" height=\"0\"></iframe></b></td></tr><tr><td colspan=2> </td></tr>";
echo "</table><br><table border=0 cellpadding=0 cellspacing=0 align=center class=main><tr><td class=header>";
echo "<center><b>".$language['BL_HIST'].":</b></center>\n";
$history = $shoutcast->GetSongHistory();
echo"<textarea rows=3 cols=40 class=frm>";
if (is_array($history)) {
for ($i=0;$i<sizeof($history);$i++) {
echo "[".get_date_time($history[$i]["playedat"])."] - ".$history[$i]["title"]."\n";
}
echo"</textarea></td></tr></table><br />";
echo'<center><a href="http://'.$btit_settings["radio_ip"].':'.$btit_settings["radio_port"].'/listen.pls" target="_new"><img src='.$BASEURL.'/radiostats/images/winamp.png width="48" height="48" title="Winamp" border="0"></a> <a href="javascript:PopRadio(\'mp\');"><img src='.$BASEURL.'/radiostats/images/mp.png width="48" height="48" title="WMP" border="0"></a> <a href="javascript:PopRadio(\'rp\');"><img src='.$BASEURL.'/radiostats/images/rp.png width="48" height="48" title="RealPlayer" border="0"></a> <a href="javascript:PopRadio(\'qt\');"><img src='.$BASEURL.'/radiostats/images/qt.png width="48" height="48" title="QuickTime" border="0"></a></center>';
echo'</td></tr></table>';
} else {
require("../".load_language("lang_shoutcast.php"));
echo $language['BL_HIST_NO'];
}
//echo "<p>";
} else {
require("../".load_language("lang_shoutcast.php"));
echo "<table width=100% cellpadding=3 cellspacing=0><tr><td class=blocklist><center><br><img src=".$BASEURL."/radiostats/images/radio-offline.png><br><br><br><font size=3><b>".$language['BL_NOSOURC']."<iframe src=\"".$BASEURL."/radiooff.php\" width=\"0\" height=\"0\"></iframe> <a href=index.php?page=dj&do=request>".$language['BL_APP']."</a></b></font><br><br>
</td></tr></table>";
}
} else {
// Ohhh, damnit..
echo $shoutcast->geterror();
}
?>
Last edited by Napon; 10th August 2019 at 18:28.
|