Warning: Call-time pass-by-reference has been deprecated
Jeg har et PHP script som viser de seneste 10 numre som spilles på en lille online radiostation. Efter at det er blevet flyttet fra en Windows til en Linux server kommer den med fejlmeddelelsen herunder, klik:http://www.calmscape.com/index.php?option=com_wrapper&Itemid=8
Det har ellers virket fint inden flytningen, men hvad går der galt? Jeg har ingen forstand på PHP men koden ser sådan ud:
______________________________________
<?php
// Shoutcast Server Stats
// Parses shoutcasts xml to make an effective stats thing for any website
// ©2004-2005 Daniel Brown http://www.gmtt.co.uk
// Please refer to the readme file for use.
include('config_radio.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;
echo''.$scdef.' is Offline';
}
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
echo'
<html>
<head>
<title>Calmscape Radio</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="refresh" content="120; url=http://www.hybels.dk/calmscape/stats/radio_stats.php" />
<style type="text/css">
<!--
.cssradio {
font-family: Arial, Helvetica, sans-serif;
}
a:link {
font-family: Arial, Helvetica, sans-serif;
text-decoration: none;
color: #FF6633;
}
a:hover {
font-family: Arial, Helvetica, sans-serif;
color: #FF9900;
text-decoration: none;
}
a:visited {
font-family: Arial, Helvetica, sans-serif;
color: #FF6633;
text-decoration: none;
}
-->
</style>
</head>
<body class="cssradio">
<p><font size="2" face="Arial, Helvetica, sans-serif"><img src="http://www.hybels.dk/calmscape/sig.jpg" width="500" height="150">
</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Commercial free radio. Playing
chillout, ambient and downbeat all day and all night. Zero stress Café ibiza with Stylish
Downbeat Grooves. Guaranteed to soothe your ears and keep you calm. </font></p>
<img src="playbar.jpg" width="500" height="57" border="0" usemap="#Map">
<map name="Map">
<area shape="rect" coords="7,25,34,53" href="http://www.calmscape.com/uploads/listen.pls">
<area shape="rect" coords="48,24,74,52" href="http://www.calmscape.com/uploads/listen.asx">
<area shape="rect" coords="91,26,117,52" href="http://www.calmscape.com/uploads/listen.rm">
<area shape="rect" coords="135,26,161,52" href="http://www.calmscape.com/uploads/listen.fpl">
</map>
<p align="left"><font size="2" face="Arial, Helvetica, sans-serif">
<font color="#FF6633" face="arial" size="2"> <b>Currently playing:</font> <font color="#000000" face="arial" size="2">'.$song[0].'</font></b></p>
<font color="#FF6633" face="arial" size="2"> <b>Recently played:</font></b> <font color=""><font face="arial" size="2"> <p align="left">
1. '.$song[1].'<BR>
2. '.$song[2].'<BR>
3. '.$song[3].'<BR>
4. '.$song[4].'<BR>
5. '.$song[5].'<BR>
6. '.$song[6].'<BR>
7. '.$song[7].'<BR>
8. '.$song[8].'<BR>
9. '.$song[9].'<BR>
</font>
<BR>
<img src="percent.gif">
<BR>
<BR>
<p align="center"><font color="#000000" face="arial" size="1">Write a message and tell us you are listening</font><br>
<font color="#000000" face="arial" size="1">speak up your opinion or just say hi...</font><BR><br>
<!-- copy this segment -->
<iframe bgcolor="#000033" align="center" src="http://www.hybels.dk/calmscape/shoutbox/viewshoutbox.php" width="250" height="275"
frameborder="0">
<font color="#FFFFFF"><a href="expanded.php">View the shoutbox</a></font>
</iframe>
<!-- END copy-->
<p><font size="2" face="Arial, Helvetica, sans-serif">Calmscape Radio is sponsored
by <a href="http://getafixxhosting.com/" target="_blank"><strong>Getafixx Hosting</strong></a>
who is hosting our radio and sponsoring the bandwidth. Without our sponsor Calmscape
Radio would be a stream of pure silence. Support Calmscape and buy a domain
or webhosting solution at Getafixx.</font></p>
</p></p>
</body>
</html>';
}
if($streamstatus == "0")
{
//you may edit the html below, make sure to keep variable intact
echo'
<html>
<head>
<title>Calmscape Radio</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.cssradio {
font-family: Arial, Helvetica, sans-serif;
}
a:link {
font-family: Arial, Helvetica, sans-serif;
text-decoration: none;
color: #FF6633;
}
a:hover {
font-family: Arial, Helvetica, sans-serif;
color: #FF9900;
text-decoration: none;
}
a:visited {
font-family: Arial, Helvetica, sans-serif;
color: #FF6633;
text-decoration: none;
}
-->
</style>
</head>
<body class="cssradio">
<p><font size="2" face="Arial, Helvetica, sans-serif"><img src="http://www.hybels.dk/calmscape/sig.php" width="500" height="150">
</font></p>
<p><font size="2" face="Arial, Helvetica, sans-serif">Commercial free radio. Playing
chillout, ambient and downbeat 24/7. Zero stress Café ibiza with Stylish
Downbeat Grooves. Guaranteed to melt your ears and keep you calm. </font></p>
<BR>
<p><font size="2" face="Arial, Helvetica, sans-serif">Calmscape Radio is sponsored
by <a href="http://getafixxhosting.com/" target="_blank"><strong>Getafixx Hosting</strong></a>
who is hosting our radio and sponsoring the bandwidth. Without our sponsor Calmscape
Radio would be a stream of pure silence. Support Calmscape and buy a domain
or webhosting solution at Getafixx.</font></p>
</p></p>
</body>
</html>';
}
?>
______________________________________