Re: is there a way to track downloads
| From: | Kevin J | Date: | Sun, 23 Jun 2002 16:31:31 +0000 |
| Subject: | Re: is there a way to track downloads | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103475@lists.php.net to get a copy of this message | ||
Hello,
My fault, I didn't state that i was a complete Newbie to PHP.
I am looking at scripts and realize that I need to use a database for this,
etc... so I am just gonna forget the whole thing.
Thanks anyways
Kevin J
"Duncan Hill" <dhill@cricalix.net> wrote in message
news:Pine.LNX.4.44.0206231222230.7055-100000@bajan.cricalix.net...
> 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.
>