atl_andy Posted April 15, 2008 Share Posted April 15, 2008 How can I limit user's access to d/l a file to once in seven days using sessions? The only way that I know to limit a session's time is in php.ini. I'm looking for something similar to setcookie("name", value, time() + 432000), but using sessions. Link to comment https://forums.phpfreaks.com/topic/101235-solved-session-question/ Share on other sites More sharing options...
awpti Posted April 15, 2008 Share Posted April 15, 2008 Sessions only exist once for every login. You need to store the download attempt in a DB or somewhere you can fetch the last DL time from. Or just use a cookie (which is easily defeated). Link to comment https://forums.phpfreaks.com/topic/101235-solved-session-question/#findComment-517844 Share on other sites More sharing options...
atl_andy Posted April 15, 2008 Author Share Posted April 15, 2008 That's what I figured, just wanted to be sure. It's for a class that I'm taking and a db isn't an option at this point. All the tuts I have read use a db. Thanks Link to comment https://forums.phpfreaks.com/topic/101235-solved-session-question/#findComment-517857 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.