faqts : Computers : Programming : Languages : PHP : Common Problems : Tips and Tricks

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

25 of 28 people (89%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

Can I use PHP to do real streaming?
How can I generate .ram files using PHP?

Aug 10th, 1999 10:57
Nathan Wallace, Michael Stearne, Manuel Lemos


PHP can't do streaming, but the QuickTime 4.0 Server (Darwin Streaming
Server) does stream  using RTSP.  It is free and can be compiled on
Intel machines.  Go To

    http://publicsource.apple.com


To generate .ram files all you have to do is set the content-type header
to audio/x-pn-realaudio and then output the media URL like this:

<?
        Header("Content-Type: audio/x-pn-realaudio");
        echo "pnm://realserver.adgrafix.com/users/ena/2001.rmd";
?>

The media URL maybe anything appropriate that your server may provide.

The regular Apache installation already assigns the MIME type
audio/x-pn-realaudio to files with the extenstion .ram .  So you don't
need PHP to output fixed metadata files.  Maybe you may want PHP to
generate metadata output depending on some parameters, like serving
different clips according to parameters defined in a form.