On Thu, 23 Dec 2004 10:44:32 -0500, GH <garyhotko@xxxxxxxxx> wrote: > I am working on a PHP based website and would like to offer media to > my visitors... I have the Audio in WMA and MP3 formats... I would like > to know how I could get them to "Stream"? inline... using PHP.... any > advice would be greatfully appreciated I didn't know how either but figured it out in a few minutes using Google. Here's what I did: mp3.html: <html> <head> <title></title> </head> <body> <embed src="mp3.m3u" autostart="true" hidden="true"> </body> </html> ////////////////////////////////////////////// mp3.php: <?php $path = "/home/destiney/mp3s/Slayer"; $file = "Seasons In The Abyss.mp3"; $file_path = "$path/$file"; $fp = fopen( $file_path, 'r' ); if( $fp ) { $contents = fread( $fp, filesize( $file_path ) ); fclose( $fp ); } else { die( "cannot open file: $file_path" ); } header("Content-type: audio/mp3;\r\n"); echo $contents; ?> ////////////////////////////////////////////// mp3.m3u ( one line ): mp3.php -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php