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 Link to comment https://forums.phpfreaks.com/topic/76484-solved-need-help-on-how-to-calculate-the-time-the-user-spend-to-the-webpage/ 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 Link to comment https://forums.phpfreaks.com/topic/76484-solved-need-help-on-how-to-calculate-the-time-the-user-spend-to-the-webpage/#findComment-387368 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. Link to comment https://forums.phpfreaks.com/topic/76484-solved-need-help-on-how-to-calculate-the-time-the-user-spend-to-the-webpage/#findComment-387378 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? Link to comment https://forums.phpfreaks.com/topic/76484-solved-need-help-on-how-to-calculate-the-time-the-user-spend-to-the-webpage/#findComment-387427 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.