"; } else { fputs($fp,"GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla Compatible\r\n\r\n"); //get 7.html while(!feof($fp)) { $page .= fgets($fp, 1000); } fclose($fp); //close connection $page = ereg_replace(".*", "", $page); //extract data $page = ereg_replace(".*", ",", $page); //extract data list($current,$connected,$peak,$max,$reported,$bitrate,$song) = explode(",",$page); //extract data if ($connected == 1) $connected = 'connected'; else $connected = 'not connected'; } $bandwidth = ($bitrate*$current)/1024 .'Mbits'; //calculate the bandwidth wasted $bitrate = $bitrate.'Kbs'; //echo the data echo "

DSP $connected and playing $song .
$current listeners out of $max at $bitrate wasting $bandwidth of bandwidth.
Tune in at $listenlink


"; } //this is the form for the input echo "
Enter the host and port of the shoutcast server you wish to queury


"; ?>