Anton0wns
Gebruiker
- Lid geworden
- 25 nov 2008
- Berichten
- 53
Hallo mensen
ik heb een kant en klare php pagina gedownload (zoals gewoonlijk ) die mijn radio afspeeld.
ik moet mijn gegevens ingeven in de config.php
nu blijkt er ook nog mogelijk heid te zijn dat de powerpod weergeeft welke DJ de radio benut, welk liedje, aantal luisteraars enz. helaas zat er geen txtje bij die zegt hoe dat moet.
hier is de config.php
ik zie wel iets van powerpanel maar heb geen idee of dat is wat ik zoek
en dit is trouwens de php die alles weer moet geven
dit is de site waar ik hem vandaan heb: http://winampnederlands.nl/internetradio/scripts/
ik hoop dat julie snappen wat ik bedoel, en me kunnen helpen
ik heb een kant en klare php pagina gedownload (zoals gewoonlijk ) die mijn radio afspeeld.
ik moet mijn gegevens ingeven in de config.php
nu blijkt er ook nog mogelijk heid te zijn dat de powerpod weergeeft welke DJ de radio benut, welk liedje, aantal luisteraars enz. helaas zat er geen txtje bij die zegt hoe dat moet.
hier is de config.php
PHP:
<?php
$sitename = "PowerPod";
$radioip = "198.145.45.134";
$port = "8002";
$siteurl = "http://www.mysite.com"; // EG http://www.mysite.com -- Please include http://www.
$radiopass = "change"; // This is used for the SHOUTcast Stats
$adminpass = "admin"; // Please enter an administrator pass to create the ASX file, etc.
// This is for people without GD Support - Just remove the "//" before the next line
// $gd = "no";
// End of no-gd support
###############################################################################
# #
# This is the POWERPanel configuration, only edit if you have powerpanel. #
# #
###############################################################################
$pp = "no"; // Edit to yes for PowerPanel add-ons
// $path2pp = "http://yoursite/djpanel/req_do.php"; // Please remove the "//" at the start of the line for the request line to function
###############################################################################
# #
# End of the POWERPanel configuration, only edit if you have powerpanel. #
# #
###############################################################################
if(empty($radioip)) {
die('Please enter a Radio IP');
}
elseif(empty($port)) {
die('Please enter a Radio Port');
}
if(empty($radiopass)) {
die('Please enter a Radio Password');
}
// Please do not alter anymore of this file
$scdef = $sitename;
$scip = $radioip;
$scport = $port;
$scpass = $radiopass;
$radioplayer = "<object classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\" name=\"$sitename\" id=\"$sitename\" width=\"0\" height=\"0\" standby=\"Loading\" codebase=\"/CODEBASE=http:/activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715\">
<param name=\" id=\"player=\"player\"\" url=$siteurl value=\"true\" />
<param name=\"CONTROLS\" value=\"Imagewindow\" />
<param name=\"ShowStatusBar\" value=\"false\" />
<param name=\"src\" value=\"http://$radioip:$port/\" />
<param name=\"url\" value=\"http://$radioip:$port/\" />
<param name=\"autostart\" value=\"true\" />
<param name=\"autoplay\" value=\"true\" />
<param name=\"Controls\" value=\"playbutton\" />
<param name=\"uimode\" value=\"mini\" />
<embed src=\"radio.asx\" width=\"0\" height=\"0\" autostart=\"True\" controls=\"playbutton\" showstatusbar=\"false\" url=\"radio.asx\" autoplay=\"true\" uimode=\"mini\"> </embed></object></object>";
$radioplayer = stripslashes($radioplayer);
?>
ik zie wel iets van powerpanel maar heb geen idee of dat is wat ik zoek
en dit is trouwens de php die alles weer moet geven
PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
body { margin: 0px; }
#title {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #2F4653; font-weight: bold; margin: 0px; }
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onLoad="MM_preloadImages('backend/includes/font.php?nav=true&text=Home&bold=yes','backend/includes/font.php?nav=true&text=Radio%20Stats&bold=yes')">
<table width="176" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><div align="left" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; ; font-weight: bold; color: #FFFFFF; margin-left: 1px; padding-left: 2px; margin-right: 1px; padding-top: 2px; height: 14px; overflow: hidden; background-image: url(images/content/top_stripe_blue.png);">Radio Stats <br>
</div>
<div align="left" style="padding-left: 5px; padding-right: 5px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;"><?php
include('backend/config.php'); //you may edit this path to fit your server environment otherwise leave it alone
$scfp = @fsockopen("$scip", $scport, &$errno, &$errstr, 30);
if(!$scfp) {
$scsuccs=1;
?>
<div align="center"><br>
<img src="images/charging.gif" width="16" height="16"><br>
<br>
<strong>De radio is momenteel offline...<br>
<br>
</strong>
<?php
}
if($scsuccs!=1){
fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
$page .= fgets($scfp, 1000);
}
######################################################################################################################
/////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//define xml elements
$loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS");
$y=0;
while($loop[$y]!=''){
$pageed = ereg_replace(".*<$loop[$y]>", "", $page);
$scphp = strtolower($loop[$y]);
$$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE)
$$scphp = urldecode($$scphp);
// uncomment the next line to see all variables
//echo'$'.$scphp.' = '.$$scphp.'<br>';
$y++;
}
//end intro xml elements
######################################################################################################################
######################################################################################################################
/////////////////////////part 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//get song info and history
$pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
$pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
$songatime = explode("<SONG>", $pageed);
$r=1;
while($songatime[$r]!=""){
$t=$r-1;
$playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
$playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
$song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
$song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
$song[$t] = urldecode($song[$t]);
$dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
$dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
}
//end song info
fclose($scfp);
}
//display stats
if($streamstatus == "1"){
//you may edit the html below, make sure to keep variable intact
?>
<strong> DJ:</strong>
<? echo("$servertitle"); ?><br>
<br>
<strong>Luisteraars:</strong>
<? echo("$currentlisteners"); ?><br>
<br>
<strong>Draaiend liedje: </strong><br>
<? echo("$song[0]"); ?>
<?
}
if($streamstatus == "0")
{
//you may edit the html below, make sure to keep variable intact
?>
<div align="center"><br>
<img src="images/charging.gif" width="16" height="16"><br>
<br>
<strong>De radio is momenteel offline...<br>
<br>
</strong>
<?php
}
?>
</div> <br><br><center><a onclick="dopage('stats.php', 'content')" style="cursor: pointer">[ Refresh ]</a></center>
</div></td>
</tr>
</table>
</body>
</html>
dit is de site waar ik hem vandaan heb: http://winampnederlands.nl/internetradio/scripts/
ik hoop dat julie snappen wat ik bedoel, en me kunnen helpen