Jump to content

Recommended Posts

Hi. Ok I have this script I am working on, so I can download any file from my site to my computer.. I am trying to make a ring tone system.

I have the uploader that allows the user to upload a ringtone in file format mp3

 

reasons being mp3 streams, so the other users can hear the ringtone on the site.

 

 

and this is the download script..

 

<?
$filename = $_GET['filename'];
$ext = $_GET['ext'];
if(empty($filename))
{
exit();
}
else
{
$test=explode(".", $filename);
$file_extension = strtolower(substr(strrchr($filename,"."),1));
header("Pragma: public"); 
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false); 
header("Content-Type: $ctype");


header("Content-Disposition: attachment; filename=\"".basename($filename.$ext)."\";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($filename));
readfile("$filename");
exit();
}
?>

 

So we know the file that was uploaded was a mp3, but the file we need for our phone is not a mp3, say we have a Iphone and the file format is .m4r

 

I thought just rename the ext. from filename.mp3 to filename.m4r

and i thought that just might work, but it will not!

 

so i have to add a converter here some how

 

preview of the ringtones uploaded are here

http://wiistream.com

 

just hit the ringtone button in the header. I have two they are mp3

but if you click the download button it opens the choice system, that lets you pic the ext format ext.

 

would any one be willing to help finish this part out I need to know how to convert maybe ffmpeg

i need help with this!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.