Shoutcast for Winamp?
Posted: Sat Sep 27, 2003 8:52 pm
why don't we take a deep look at this?
can we read the song playing information?
check this out
can we read the song playing information?
check this out
Code: Select all
<?php
$stream_ip = "http://sb.mthn.net";
$stream_port = "8000";
$fp = fsockopen($stream_ip, $stream_port, &$errno, &$errstr, 30);
if ($fp) {
fputs($fp, "GET / HTTP/1.0\r\n\r\n");
fputs($fp, "User-Agent: SHOUTcast PHP Proxy 10.1\r\n\r\n");
fputs($fp, "icy-metadata:1\r\n\r\n");
while(!feof($fp)) {
echo fgets($fp,128) . "\n";
}
} else {
echo "Cannot open stream. ($errstr)";
exit;
}
?>