Playing RealAudio files on the fly!
| From: | hamidhossain at spymac dot com | Date: | Fri, 28 May 2004 18:44:53 +0000 |
| Subject: | Playing RealAudio files on the fly! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-187160@lists.php.net to get a copy of this message | ||
Hi,
I want to play realaudio files without showing their location in my site.
That means I have to use php header() function to change the MIME type of
the page to "audio/x-pn-realaudio" which looks to me the correct MIME to
paly real files.
Unfortunately, I did not success in playing those files. I need some help. I
will show down what I did:
[code]
$file = // name of the file
$path = // path to the name of the file
header("Content-Disposition: attachment; filename=$file");
header("Content-Length: " . filesize($path));
header("Content-Type: audio/x-pn-realaudio");
readfile("$path");
[/code]
any help would be highly appreciated.
Regards,
Hamid