Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Saber si está On-line Icecast

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Foro Español
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Thu May 04, 2006 7:43 pm    Post subject: Saber si está On-line Icecast Reply with quote

Les cuento mi situación:

Tengo una página web en un servidor pagado en internet y quiero poner un enlace a una radio que he instalado en mi ordenador que tiene conexión directa a internet y que he probado y me funciona sin problemas (después de solucionar el problema con el firewall)

El problema es que quiero detectar cuando Icecast está running para efectivamente poner radio-on y en caso de que no esté.. poner radio-off. Cómo puedo conseguir eso? Inicialmente había puesto lo siguiente en mi página index.php:

<?php

function getInfo($ip, $puerto) {

$socket = @fsockopen($ip,$puerto,$errno,$errstr,2); $conectado = 1;
if (!$socket) {
$conectado = 0;
}
else
{
fclose($socket);
}
return $conectado;

}

function getRadioStatus() {
$host=miip;
$puerto=8000;
$ip = gethostbyname($host); $estado = getInfo($ip,$puerto);
if ($estado==1) echo "Radio ON" ;
else
echo "Radio OFF";
return;
}

getRadioStatus(); //con esto imprimo

?>

/***************************************/

El caso es que no me funciona.. porque da la impresión que fsockopen no va.. uff Sad hay alguna alternativa?

Muchas gracias
Back to top
Anonymous
Guest





PostPosted: Tue May 09, 2006 5:41 pm    Post subject: olvidé comentar... Reply with quote

que tengo icecast instalado en windows (xp para ser exactos)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Foro Español All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber