<?php
error_reporting(0); 

$input1 = $_SERVER['QUERY_STRING'];
//$input1 = _2KBZT;

if (strpos($input1, "2")){
$input2 = stristr ($input1, '2');
$input =(substr ($input2, 1, 6));

//prints stream "string" from http + station ID
$f = "http://wmc1.den.liquidcompass.net/$input";
}

elseif (strpos($input1, "9")){
$input2 = stristr ($input1, '9');
$input =(substr ($input2, 1, 6));
//ads FMAAC to station input
$input .= "FMAAC";
//prints stream "string" from http + station ID
$f = "http://stream.us.gslb.liquidcompass.net/$input";
$filename = "$input.pls";

header('Content-Type: application/pls'); 
header('Content-Disposition: attachment; filename="' . $filename . '"'); 
echo "[playlist]
File1=$f";
exit();
}


elseif (strpos($input1, "7")){
$input2 = stristr ($input1, '7');
$input =(substr ($input2, 1, 6));
//ads FMAAC to station input
$input .= "FMAAC";
//prints stream "string" from http + station ID
//$f = "http://edgev1.den.echo.liquidcompass.net/WSTRFMAAC/$input.pls";
if ($input == "KMCQFMAAC"){
$f = "http://204.209.255.119/$input";
}
else
$f = "http://edgev1.den.echo.liquidcompass.net/$input";
$filename = "$input.pls";

header('Content-Type: application/pls'); 
header('Content-Disposition: attachment; filename="' . $filename . '"'); 
echo "[playlist]
File1=$f";
exit();

}

elseif(strpos($input1, "8")){
$input2 = stristr ($input1, '8');
$input =(substr ($input2, 1, 5));

if ($input == "KGY"){
$f = "http://ice3.securenetsystems.net/KGYFM.m3u";
}
elseif (($input == "WZWW") || ($input == "WWZW")){
$f = "http://stream1.securenetsystems.net/$input";
}
elseif (($input == "WZEB") || ($input == "WQYX")){
$f = "http://stream3.securenetsystems.net/$input";
}
elseif ($input == "KSMZ"){
$f = "http://stream2.securenetsystems.net/$input";
}
elseif ($input == "WPNC"){
$f = "http://streamer2.securenetsystems.net/wjlj";
}
else
$f = "http://ice3.securenetsystems.net/$input.m3u";
}

//else open surfernetwork
else 
// $f = "http://lightningstream.surfernetwork.com/Media/player/scripts/player.aspx?call=$input1";
$f = "http://nick11.surfernetwork.com/=$input1";
?>

<html>
<head>
<script type="text/javascript">
<!--
window.location = "<?php echo "$f" ?>"
setTimeout("self.close();",2000) 
//-->
</script>
</head>
<body></body>
</html>
