| View previous topic :: View next topic |
| Author |
Message |
lemonshindig
Joined: 10 Jun 2006
Posts: 2
|
| Posted: Sat Jun 10, 2006 6:43 pm Post subject: Help disabling audio streaming of mp3 files on my server |
|
|
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 |
|
| Back to top |
|
Joshua Meadows (DemoRic)
Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas
|
| Posted: Sat Jun 10, 2006 9:21 pm Post subject: |
|
|
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 |
|
| Back to top |
|
lemonshindig
Joined: 10 Jun 2006
Posts: 2
|
| Posted: Sun Jun 11, 2006 12:45 am Post subject: |
|
|
| is there some other audio format i could use that doesn't stream? |
|
| Back to top |
|
cigraphics
Joined: 21 Aug 2005
Posts: 147
Location: Romania, Pitesti
|
| Posted: Mon Jul 31, 2006 10:22 am Post subject: |
|
|
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>
|
|
| Back to top |
|
| |