function checkstream($ipaddress, $port)
{
include_once('./ShoutcastInfo.class.php');
//Now we want to create our handle.
//Normaly we have to give hostname and port and-or timeout.
//Because Radio-GaGa uses port 8888 we wouldnt need.
$scs = &new ShoutcastInfo($ipaddress,$port);
//Connect to server
//If an error is happen, it will return false
//and we can handle insite the if brackets.
if( @!$scs->connect() )
{
//Any error happend?
//Print it out! (e.g. die($scs->error(TRUE)); because of our text/plain header)
//@die($scs->error(TRUE));
// don't error out if can't connect - just bring up the site
}
//After connection is etablished, we want to send our request to the server.
//Also we will get the datas with this, but it doesnt matther that it is
//in one function, because we need those 2 thinks ecentialy.
$scs->send();
//Now we want to parse the complete datas we recived, because we want to dump
//all aviable infos :P
$data = $scs->parse();
//After rescuing our datas to $data we can close our connection,
//we wouldnt need it, else we can reconnect with $scs->refresh()
$scs->close();
//Now we want to print out the datas..
//This is very simple using an print_r,
//because we fetched an assoc array from $scs->parse..
//print_r($data);
return $data["status"];
}
?>
 |
// if (checkstream("192.168.111.100",8000)) {
//
// echo "
PenthouseBeats Radio playing now";
// }
?>


ROLLIN IN THE DEEP SHAG

HOUSEY DOINGS

AUDIO LUBRICANT

THIS IS THE SOUND OF YOUR BRAIN CRACKING
|
|
|
|