All pastes #398933 Raw Edit

Mine

public php v1 · immutable
·published 2007-03-17 17:22 UTC
rendered paste body
/*This is the headers the .nsv file sends from Apache. This file streams perfect with winamp.Array(    [0] => HTTP/1.1 200 OK    [1] => Date: Sat, 17 Mar 2007 17:05:25 GMT    [2] => Server: Apache/2.2.3 (Win32)    [3] => Last-Modified: Sun, 11 Mar 2007 20:49:38 GMT    [4] => ETag: "4cf4c-29b7841-cb898ab6"    [5] => Accept-Ranges: bytes    [6] => Content-Length: 43743297    [7] => Connection: close    [8] => Content-Type: text/plain    [9] => X-Pad: avoid browser bug)*///This is my program which tries to emulate the .nsv stream by serving the same file as above!<?php<?php	$path = "e:/htdocs/movie.nsv";	$f = fopen($path, "r");		$r = fread($f, 1000000000);	fclose($f);		header("HTTP/1.1 200 OK\n");	header("icy-metadata: 0");	header("Date: Date: Sat, 17 Mar 2007 17:05:25 GMT\n");	header("Server: Apache/2.2.3 (Win32)\n");	header("Last-Modified:Sun, 11 Mar 2007 20:49:38 GMT\n");	header("Etag:\"4cf4c-29b7841-cb898ab6\"\n");	header("Accept-Ranges: bytes\n");	header("Content-Length:	43743297\n");	header("Connection: close\n");	header("Content-type: text/plain\n");	header("X-Pad: avoid browser bug\n");		echo $r;?>//This gives no errors (when I view the content with text/html). However when I play in winamp, it thinks the length of the movie is 121 minutes (time doesnt change) and the audio is garbled, so something is corrupt./*These are the headers that my program actually puts out, just to double check:Array(    [0] => HTTP/1.1 200 OK    [1] => Date: Sat, 17 Mar 2007 17:22:14 GMT    [2] => Server: Apache/2.2.3 (Win32)    [3] => X-Powered-By: PHP/5.1.6    [4] => Etag: "4cf4c-29b7841-cb898ab6"    [5] => Accept-Ranges: bytes    [6] => Connection: close    [7] => X-Pad: avoid browser bug    [8] => Last-Modified: Sun, 11 Mar 2007 20:49:38 GMT    [9] => Content-Length: 43743297    [10] => Content-Type: text/plain)I'm wondering what I have to do here to make winamp think that the file is being served via HTTP 1.1 by apache?*/