ah, true. good one; so if a download failed, then they'd lose one and you wouldn't know. I see.
Well .. if _what_ they are downloading can also be recorded in the database, then allow them access to download that same thing however many times they want. So if it should fail or succeed, it wouldn't matter. This is an option, maybe? That is, if the user is restricted to ONE download, then they select the one they want and are limited to that one from then on. ... just an option ... probably not exactly what you want ... especially if you want to allow 2+ downloads ... good luck! nicole www.aeontrek.com "Olivier Hubert" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Yes, I can know how many files users have downloaded, I already log this > and allow them to be ranked by the number of downloads. However, I want to > restrict downloads so that a given user can only download one file at a > time. My problem is that I don't know how to monitor the downloads so that > I can identify for sure when a user has finished a download or not. > > Thanks for the help :-) > Olivier Hubert > > At 11:25 2002-01-25 -0500, Nicole Amashta wrote: > >If they are registed, this means they must login, which you may then be > >using database for this. Add a new field, totaldownloads, and update that > >field for each download. You know who it is because they logged in. Each > >time the user logs in with that name, you always know their download count. > > > >good luck, > >nicole amashta > >www.aeontrek.com > > > >======================== > >"Olivier Hubert" <[EMAIL PROTECTED]> wrote in message > >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > At 20:57 2002-01-24 +0000, Symeon Charalabides wrote: > > > > > I have a web site with a lot of files that are downloadable only by > > > > > registered users. Session variables are used to keep track of who is > > > > logged and > > > > > who is not (non-registered users can still browse the files, but not > > > > download > > > > > them). Now, I would like to have a limit of one download/user. Is > >there > > > > a way I > > > > > can limit the downloads with PHP or even an Apache configuration? > > > > > > > >The simplest way is to set a flag via a cookie - very easy with PHP. > > > >Something > > > >along the lines of: > > > > > > > >if (DOWNLOAD) > > > > setcookie('has_downloaded','1',time()+60*60*24*(number of > >days),'\'); > > > > > > > >However, knowledgable people can see through the cookies system and > >delete > > > >the cookie from their PC, allowing them to download more. > > > >As I said, it's only the simplest system... > > > > > > This is a good idea, but then again, how do I know for sure when > >a > > > user has finished his download and can download another file? With > > > something like this (which I could enable in a session variable), a user > > > can only download one file before being rejected by the system. > > > > > > Olivier Hubert > > > > > > > > > > >-- > >PHP Windows Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]