1
Good night. I’m having a problem with a radio shoutcast connection code. In localhost: 127.0.0.1/tributus/server/on.php it returns the music that is passing normal, already hosted it returns as a connection error:
Connection timed out (110)
<?php
$ip = "170.75.145.250";
$port = "17652";
$conexao = @fsockopen($ip,$port,$errno,$errstr,1);
if (!$conexao) {
echo "$errstr ($errno)<br />\n";
} else {
fputs($conexao, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
while (!feof($conexao)) {
$dados = fgets($conexao);
}
$dados = str_replace('</body></html>', "", $dados);
$resultado = explode(',', $dados);
echo($resultado[6]);
}
?>
Has or has ever seen a solution to this connection?