Adthegreat Posted March 26, 2006 Share Posted March 26, 2006 Hey!I'm making a php/mysql based website, and an important part of said website, is the access to certain pages. I have to limit the viewing of the pages per user to every 5 minutes or so. Now, i know how to do this using cookies, however cookies can be deleted from the user's browser thus giving them access to the restricted page whenever they are willing to delete their cookies.Is there any way i could use Session's to avoid this problem. I have looked around a bit and can not find anywhere about session's expiring after certain periods of time like the: "time()+300" with cookies.and even if you can, can you just close the browser to start a new session every time they want to view the page.The only other alternate would be for me to make a "Time" table on my MYSQL database, but that would probably mean alot of comparision's and query's which could only slow the whole website down.Any thoughts on this would be greatly appreciated!Yours faithfully, Adthegreat. Quote Link to comment Share on other sites More sharing options...
azuka Posted March 26, 2006 Share Posted March 26, 2006 session_set_cookie_params() accepts two parameters -- timeout and the cookie path [if your session uses cookies]. Quote Link to comment Share on other sites More sharing options...
Adthegreat Posted March 26, 2006 Author Share Posted March 26, 2006 But could this session be exited by exiting the browser, thus negating the time limit? 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.