Hello, I'm trying to make it so users can download mp3s off my site.

I've tried to download files with PHP but everything I've tried has been unsuccessful, so I decided to download with the following

[url]ftp://ftp.mySite.com/Files/song.mp3[/url]

and it works except if I click cancel and try to download it again it takes me to

[url]ftp://ftp.mySite.com/Files/song.mp3[/url]/

Does anyone know what I can do to fix this, Thanks in Advance.

    No idea, what you could do though is the following:

    $file_name = $_GET['image'];
    
    $file_path = "/path/to/the/file/";
    
    if(file_exists($file_path. $file_name) == true){
    	$mime_type = mime_content_type($file_path . $file_name);
    	header("Content-type: $mime_type");
    	readfile($file_path. $file_name);
    }
    else{
    	echo("The file does not exist!");
    }
      Write a Reply...