Web Hosting Talk







View Full Version : A Decent Downloading System


Salman88
04-12-2006, 04:06 PM
Hey,

I have lots of files in several folders, Is there a downloading system available that will automatically provide download link for those files?

Kind of like a file manager but with security on it that will disable functions like Deleting, Copying the files....

Any Idea?

Thanks,
Salman

xskter9000
04-13-2006, 06:11 PM
What is it exactly that you are looking for... Something like a download protection so that you have to signup and pay before you download or am I missing the point.

Salman88
04-14-2006, 02:04 AM
Well I have a LOT of files and I dont want to enter them 1 by 1 in the system, So.. Basically I want to have a system that will automatically detect the files and subfolders in the directory given, Kind of like a File Manager, but ofcourse with a leech protection.

Thx

carolinahosting
04-14-2006, 07:33 PM
It's been many many years but I do know a program is out there. Search google for file indexing.

Kalyse
04-14-2006, 08:13 PM
I had a script that worked with JPGs. It would itterate through every directory and sub directory and list all the images and create thumbnails. Havent been able to find it since, but im sure you might be able to find something simialr for your needs

FileGig
04-14-2006, 08:57 PM
It sounds like you're asking for an Apache File List...

Salman88
04-14-2006, 10:19 PM
Yeh but the thing is I want to hide the File Path... To stop the leechers...

FileGig
04-15-2006, 03:41 AM
Ah, okay, I'm guessing you would probably want a script something like this: -

<?php
// Connect to MySQL database

if ($handle = opendir('/path/to/files')) // your dir name here
{
while (false !== ($file = readdir($handle))) // while still files to read
{
if ($file != "." && $file != "..") // don't use . and ..
{
// MySQL query here to add file information
// Needs an auto_increment field to give unique file ID
}
}
closedir($handle);
}
?>
Then you can just write a simple PHP script that finds the file info from the UID, e.g. download.php?file=42 - that should effectively hide your file path. Just put a .htaccess file in the directory with the files in, e.g.

order deny,allow
deny from all
allow from 202.71.251.104 (YOUR SERVER IP HERE!!!)
and you should be sorted. Good luck!