On Sun, 23 Jun 2002, Kevin J wrote:

> Hey all,
> 
> I would like to place some files on my site and use PHP to track how many
> users have downloaded those files.
> 
> Is this possible?

Approach the problem logically:

1) You have a series of files that you want people to download.
2) You want to track which files are downloaded.
3) You don't want people accessing the files directly.

So, a file called download.php.
Accepts a parameter - the file name to make available.
Logs an entry of IP and file (and whatever else) to a file / database / 
whatever.
Makes the file available to the user - but the path is hidden / created on 
the fly so that a particular file cannot be pulled without going through the 
script.

The actual code is left as an excercise for the reader.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to