Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Cookies for download hits?
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Amailer




PostPosted: Thu Mar 04, 2004 9:28 pm   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Fri Mar 05, 2004 7:17 pm   Post subject: (No subject)

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
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Amailer




PostPosted: Fri Mar 05, 2004 7:24 pm   Post subject: (No subject)

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




PostPosted: Fri Mar 05, 2004 9:53 pm   Post subject: (No subject)

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
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: