I need to privatise my download links, so know-one really knows the true DIR of the download.
I've found this script, although it only downloads my download.php [The actual script, and not the .zip file i wanted to download]! Why!?
So what am i doing wrong?
I've found this script, although it only downloads my download.php [The actual script, and not the .zip file i wanted to download]! Why!?
| Code: |
|
// download.php Script $fileLocation = '/home/domains/your.domain/public_html/download/'; $file = 'filename.zip'; header("Cache-control: private"); header('Content-Description: File Transfer'); header('Content-Type: application/force-download'); header('Content-Length: ' . filesize('$fileLocation' . $file)); header('Content-Disposition: attachment; filename=' . $file); |
So what am i doing wrong?
