Perchè in locale funziona perfettamente mentre su Altervista no????
Codice PHP:
<?
// PHP Script
//
// OtsDJ
// Now Playing Song
//
// By Pascal <pascal@9634.net>
//
// CONFIG
$ip = "redirect.no-ip.biz";
$port = "1234";
// END OF CONFIG
$title = implode("", file("http://$ip:$port/x/query.cgi?q=status"));
$title = str_replace(CHR(10)," ",$title);
$title = str_replace(CHR(13)," ",$title);
preg_match("/Artist=(.*) Title=(.*)$/", $title, $title_out);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="refresh" content="15"/>
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
background-image:url(back.gif);
}
.Titolo {
color: #999999;
font-family:Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
}
.Artista {
color: #66789D;
font-family:Arial, Helvetica, sans-serif;
font-size: 24px;
font-weight: bold;
}
.title {
color: #FFFFFF;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
}
-->
</style>
<script language="JavaScript">
<!--
function show5(){
if (!document.layers&&!document.all)
return
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="AM"
if (hours>12){
dn="PM"
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here to your desire
myclock="<font size='3' face='Arial' color='#9999FF'><b><font size='1'>Sono le ore:</font></br>"+hours+":"+minutes+":"
+seconds+" "+dn+"</b></font>"
if (document.layers){
document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}
else if (document.all)
liveclock.innerHTML=myclock
setTimeout("show5()",1000)
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="show5()">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="200"><p class="title">Benvenuto su FEVER Net-Radio!<br>
Stiamo trasmettendo:<br />
<br />
</p>
</td>
<td width="200" align="right"><span id="liveclock">
</span></td>
</tr>
<tr>
<td colspan="2"><span class="Artista"><? echo("$title_out[1]"); ?></span>
<br /><span class="Titolo"><? echo("$title_out[2]"); ?></span></p></td>
</tr>
</table>
</body>
</html>
L'ip e la porta sono fasulli :P
GRAZIE MILLE
CIAO CIAO