Jump to content

janlux

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by janlux

  1. hi cs.punk, but that code that you give me i need to put it on a php with html code page...or not? because I only have download.php that redirect 5 files with indirect link like: http://www.mysite.com/sound/music/download.php?id=12345 and so on with 4 files more. So when the user acces to that link, its start to download imnediatly and open with a win player, and I need to have a ''save as'' to save the file in PC. I dont want the streaming..... What I need to put in the code? <?php //make the filename from the id $requested_file = $_GET['id']."mp3"; //then construct the url of the requested file $requested_url = "http://www.mysite.com/sound/music/".$requested_file; //then redirect to the correct location header("Location: ".$requested_url, FALSE, 302); ?>
  2. Hi lemmin, I was meaning that I need the indirect link. For example, http://www.mysite.com/getaudio.php?id=12345. The script 'getaudio.php' would take the value of $_GET['id'] and create a direct link to the required file. php file : <?php //make the filename from the id $requested_file = $_GET['id']."mp3"; //then construct the url of the requested file $requested_url = "http://www.mysite.com/audio/".$requested_file; //then redirect to the correct location header("Location: ".$requested_url, FALSE, 302); ?> But when they go to that URL, the song start to download inmediatly and there is no save as....and I need to ofer the oportunity to save it in the PC...what I need to do about this case?
  3. Hi all, At the first, my congratulations for the forum, its seems that is a lot of info here Here is my question on $_GET['$ID'] im new on this ...so if some one can help me it will be great! I have a few files (mp3) in my web site, that I want the users download them from download.php from id there are few files in my web site mp3 for ejemple to download the file 93856.mp3 and 49673.mp3 depending on url id in download.php Im about what to put...i have something like this... <?php $id=$_GET['id_song']; $ID = $_GET['id']; switch ('ID') { case 1: $ann = '93856'; $atr = '.mp3'; case 2: $ann = '49673'; $atr = '.mp3'; $id_song= ?> or is something like this? <?php $id=$_GET['id_song']; $id_song=93856 $id_song=49673 ?> to get download the files the url for this files is ejemple: http://www.mywebsite.com/folder/downloa ... song=93856 http://www.mywebsite.com/folder/downloa ... song=49673 or this is wrong? cos' I've read some article on this...but its seems is wrong in all.... help me please... hugs to all
×
×
  • 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.