
-----------------------------------
Amailer
Thu Mar 04, 2004 9:28 pm

Cookies for download hits?
-----------------------------------
Hey, okay... i wanna know... should i make it so that for every download, a cookie is  set to last 24/h's? Or would that be a bad idea?

I want to make it so that people don't give the download hit's every 24/h.

-----------------------------------
Dan
Fri Mar 05, 2004 7:17 pm


-----------------------------------
i have no idea what u are doing this for but if u are using a phpbb borad on the same site why not make it so they have to be a memebr to dl and then just store it in the db? b/c poleop can esaly modify or just delte the file

-----------------------------------
Amailer
Fri Mar 05, 2004 7:24 pm


-----------------------------------
but i want it so that everyone can dl it but.... i don't want the person to keep clicking and giving the download tons of hits--

-----------------------------------
wtd
Fri Mar 05, 2004 9:53 pm


-----------------------------------
Cookes are easy to fake.  Don't rely on them to store critical information.  Instead use sessions.  Every visitor gets a unique number, stored in a cookie.  That is then used to lookup data on the server which says how long it's been since they last downloaded a file. 

http://www.php.net/manual/en/ref.session.php
