Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Então, já tentei vários códigos daqui, de outros sites também. E NADA!
Tenho certeza que é ShoutCast, e boto, no Localhost da certo!
Já no site não! Fica carregando 1 ano e depois da erro, aparece um ERROR LOG NO FTP
Código utilizado:
<?php
$sc_url_ip = "74.222.3.176";
$sc_url_port = "17308";
function getNowPlaying($sc_url_ip,$sc_url_port)
{
$open = fsockopen($sc_url_ip,$sc_url_port);
if ($open) {
fputs($open,"GET /7.html HTTP/1.1\nUser-Agent:Mozilla\n\n");
stream_set_timeout($open,'1');
$read = fread($open,200);
$text = explode(",",$read);
if($text[6] == '' || $text[6] == '</body></html>'){ $msg = ' live stream '; } else { $msg = $text[6]; }
$text = $msg;
} else { return false; }
fclose($open);
return $text;
}
$current_song = getNowPlaying($sc_url_ip,$sc_url_port);
print $current_song;
?>
PODEM TENTAR AI NO LOCALHOST, TA FUNCIONANDO PERFEITAMENTE!!!
NA HOSPEDAGEM QUE É DA MESMA EMPRESA NÃO FUNCIONA...
Olhem O LOG:
[22-Dec-2012 05:11:43 America/New_York] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 74.222.3.176:17308 (Connection timed out) in /home/hotelevo/public_html/site/radio/play.php on line 10
[22-Dec-2012 05:11:45 America/New_York] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 74.222.3.176:17308 (Connection timed out) in /home/hotelevo/public_html/site/radio/play.php on line 10
[22-Dec-2012 05:12:45 America/New_York] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 74.222.3.176:17308 (Connection timed out) in /home/hotelevo/public_html/site/radio/play.php on line 10
[22-Dec-2012 05:13:45 America/New_York] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 74.222.3.176:17308 (Connection timed out) in /home/hotelevo/public_html/site/radio/play.php on line 10
[22-Dec-2012 05:15:06 America/New_York] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 74.222.3.176:17308 (Connection timed out) in /home/hotelevo/public_html/site/radio/play.php on line 10
[22-Dec-2012 05:15:10 America/New_York] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 74.222.3.176:17308 (Connection timed out) in /home/hotelevo/public_html/site/radio/play.php on line 10
[22-Dec-2012 05:19:54 America/New_York] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 74.222.3.176:17308 (Connection timed out) in /home/hotelevo/public_html/site/radio/play.php on line 10
[22-Dec-2012 05:21:24 America/New_York] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 74.222.3.176:17308 (Connection timed out) in /home/hotelevo/public_html/site/radio/play.php on line 10
[22-Dec-2012 05:22:24 America/New_York] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 74.222.3.176:17308 (Connection timed out) in /home/hotelevo/public_html/site/radio/play.php on line 10
Alguém tem a solução?
Carregando comentários...