Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Help disabling audio streaming of mp3 files on my server
Google
Post new topic Reply to topic
Author Message
lemonshindig
 
 


Joined: 10 Jun 2006
Posts: 2

PostPosted: Sat Jun 10, 2006 6:43 pm Reply with quoteBack to top

I'm trying to find a way to send sound clips via php headers which cannot be played until the file is completely received by the client. But, by default, the audio files are set to stream.

thanks
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Sat Jun 10, 2006 9:21 pm Reply with quoteBack to top

Honestly I don't know if this can be done. If a client program automatically starts to play an mp3 it will stream it since that is what mp3's were designed for. If a client doesn't have something setup to do this then the whole file will be downloaded.

The only thing I think you could do would be to change the format to zip
View user's profileSend private messageYahoo MessengerICQ Number
lemonshindig
 
 


Joined: 10 Jun 2006
Posts: 2

PostPosted: Sun Jun 11, 2006 12:45 am Reply with quoteBack to top

is there some other audio format i could use that doesn't stream?
View user's profileSend private message
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Mon Jul 31, 2006 10:22 am Reply with quoteBack to top

you can do a force download with php
call this file download.php
Code:

<?
$file = $_GET['file'];
header ("Content-type: octet/stream");
header ("Content-disposition: attachment; filename=".$file.";");
header("Content-Length: ".filesize($file));
readfile($file);
exit;
?>

then for the download link
Code:

<a href="download.php?file=file.extension">Filename</a>
<a href="download.php?file=melody.mp3">Melody</a>
View user's profileSend private messageSend e-mailYahoo Messenger
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT