You can use php to initiate the download for you, instead of linking directly to your files.
Also used to prevent "file leeching".

Theres a few examples here:
Look at the user contributed comments.

What you can do either write to a database, or flatfile when a file is being downloaded.

a user clicks to download your from the php script url:
Your php script will open a stream to the file that needs to be downloaded, then send that same stream to the browser. (using fopen or fsockopen etc. see: )
Your php script then needs to send the appropriate headers to the browser, to let it know that this is a file download (not a regular html page). see:
Your php script then writes to the database, or flat file, that this file is being downloaded by a certain user with certain session id. see:

When the user is downloading, you can have a flag that says so. The flag can be removed when the download is done.

So what you write to say a db would be.

"insert into current_downloads set session_id = $session_id, file_id = $file_id, status = 'downloading'";

When you're done you just update the status:
"update current_downloads set status = 'done' where session_id = $session_id and file_id = $file_id";

something along those lines...

hope thta helps.

This article has been dead for over six months. Start a new discussion instead.