header("Content-type: audio/m3u");  # Or something not unlike that... Check
what you get for a static m3u file.
header("Content-length: " . strlen($buffer));

Those two should do it.

If you have problems, check the output from a static file, and add headers
until it works...

>From a Un*x command prompt, just do this:

telnet yourserver.com 80
GET /some/path/to/static.m3u HTTP/1.0


Hit return twice after that last line.

If you're on Windoze, you'll need to find a telnet client that will let you
send raw commands, which, alas, is not what ships with Windows.  You end up
with some damn GUI if you try this in a default config from MS-DOS prompt
:-(

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Chris Cocuzzo <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 12:51 PM
Subject: [PHP]Packing file data into a variable???


hey-

my main goal here is to be able to stream an mp3 through any player that can
accept m3u files. My idea was to use the format of an m3u file, which looks
like this:

#EXTM3U
#EXTINF:324,cs-1.mp3
http://www.fplg.net/audio/cs-1.mp3

and pack it into a variable to be sent out using a header command...as such:

$buffer = "#EXTM3U\n";
$buffer .= "#EXTINF:-1,cs-1.mp3\n";
$buffer .= http://www.fplg.net/audio/cs-1.mp3;

I'm not sure of the exact header command I should use, or rather the format
of the command I'd send using the header function, but is this possible or
do I need to do this some other way??

chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to