andz Posted November 8, 2007 Share Posted November 8, 2007 I need a code that will calculate the time the user spend to the webpage. After specific timeline for example 1 minute, after 1 minute, the user will be redirected to login page. anyone could help. hopefully its written in php and not in javascript. thanks Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted November 8, 2007 Share Posted November 8, 2007 Impossible request without knowing how your script is logging in and tracking users. Are you using sessions? And a one minute demand for re-login is a little short, isn't it? PhREEEk Quote Link to comment Share on other sites More sharing options...
andz Posted November 8, 2007 Author Share Posted November 8, 2007 Yes, i'll be using sessions for this. If the user isn't logged in and try to view the webpage, user will be given specified time to stay and read to that webpage but after the given time lapsed, user will be redirected to login page. Quote Link to comment Share on other sites More sharing options...
Aureole Posted November 8, 2007 Share Posted November 8, 2007 Maybe... <?php if(user is not logged in...) { ?> <meta http-equiv="refresh" content="60;url=http://yoursite.com/signin.php"> <?php } ?> Could it be that simple? 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.