hi phantazm ... did you find a solution how to suppress or replace the http headers? i am trying to set up a audio streaming application with the HTTP/ICY protocol ...
i was trying to set the headers like this:
header("ICY 200 OK");
header("icy-notice1:<BR>This stream requires <a href=\"http://www.winamp.com/\">Winamp</a><BR>");
header("icy-notice2:Smaaps Musicbox Audio Server PHP<BR>");
header("icy-name:Smaaps Best of Radio");
header("icy-genre: Best of Musicbox");
header("icy-url:http://music.dyndns.org");
header("content-type:audio/mpeg");
header("icy-pub:1");
header("icy-metaint:0"); //32768
header("icy-br:192");
But either Apacher or PHP always replace the "ICY 200 OK" header with "HTTP/1.1 200 OK" and add other headers such as Server und X-Powered. Is there any way to avoid this?
I was also trying to open a socket to the requesting application. But that also fails. I think the applications (browser or winamp) only accepts the response from the port they were requesting (wich was 80 and is used by apache).
$fp = fsockopen($_SERVER['REMOTE_ADDR'], $_SERVER['REMOTE_PORT'], $errno, $errstr, 12);
fputs($fp, "ICY 200 OK\r\n");
fputs($fp, "icy-notice1:<BR>This stream requires <a href=\"http://www.winamp.com/\">Winamp</a><BR>\r\n");
fputs($fp, "icy-notice2:Smaaps Musicbox Audio Server PHP<BR>\r\n");
fputs($fp, "icy-name:Smaaps Best of Radio\r\n");
fputs($fp, "icy-genre: Best of Musicbox\r\n");
fputs($fp, "icy-url:http://music.dyndns.org\r\n");
fputs($fp, "content-type:audio/mpeg\r\n");
fputs($fp, "icy-pub:1\r\n");
fputs($fp, "icy-metaint:32768\r\n");
fputs($fp, "icy-br:192\r\n\r\n");
Any ideas how to solve this problem?