View Single Post
Old 23-10-2005, 14:06   #9
JediMaster
Inactive
 
JediMaster's Avatar
 
Join Date: Jan 2004
Location: Swansea
Posts: 1,376
JediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these parts
Re: megaupload.com Question on Effect

Cheers Buddy...

To Re-Cap..

in .htaccess file
Code:
<Files mp3>
ForceType application/x-httpd-php
</Files>
Then... (edit /path/to/mp3/files/ to Folder Path)

Code:
<?php
$uri = explode("/",$_SERVER['PATH_INFO']);
$path = "/path/to/mp3/files/"; //path without any filenames!!! Must have trailing backslash
header("Content-Description: File Transfer");
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=".basename($path.$uri[1]));
@readfile($path.$uri[1]);
?>
& add this to the same Page...

Code:
<script language="javascript">
function savefile() {window.location=http://ww.site.com/files/file.ext;}
</script>

<input type="button" value="Download this file..." name="savefile" onclick="savefile()">
Is that correct?
JediMaster is offline   Reply With Quote