brooksh Posted September 23, 2010 Share Posted September 23, 2010 I am trying to figure out how to setup cookies so that you can only view certain pages a few times, but then it will take you to a registration page. And if you hit refresh or back it will take you to a second registration page. I want to be able to allow a new visitor access for a limited time, but then force registration. Does anyone know how to accomplish this? Quote Link to comment Share on other sites More sharing options...
Jocka Posted September 23, 2010 Share Posted September 23, 2010 log session_id's and ip addresses along with date/time would be a good way. then you could just have some code to check if the time is beyond the allotted time you have in mind (say, 5 minutes). Then if it's past that time, automatically forward to the registration page. Quote Link to comment Share on other sites More sharing options...
fortnox007 Posted September 23, 2010 Share Posted September 23, 2010 yeah sessions would be better than cookies, but like cookies sessions can be destroyed. another way could be to log the ip address in a database with a start time and end time. Ones the end time is past you can deny access or something or let them redirect to a register page. But if someone wants he can of course spoof it's IP. but that's all that is possible with guests I think. You can do more with registered people ofc. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.