Jagand Posted December 2, 2010 Share Posted December 2, 2010 Hi! I would like to know if there is a way I can find the time a user spends reading a webpage. I can get the session start timestamp but failed to get session end timestamp or session duration. Can you please help? Link to comment https://forums.phpfreaks.com/topic/220507-how-to-find-session-duration-in-php/ Share on other sites More sharing options...
ManiacDan Posted December 2, 2010 Share Posted December 2, 2010 You cannot tell how long a user spends on the page using pure PHP. You'll have to use a javascript function that "checks in" with the server and updates the timestamp every few seconds. However, there's not really a need for this, as leaving the window open in the background would break your stats. -Dan Link to comment https://forums.phpfreaks.com/topic/220507-how-to-find-session-duration-in-php/#findComment-1142395 Share on other sites More sharing options...
prathikraj Posted December 16, 2010 Share Posted December 16, 2010 Use javascript or flash Link to comment https://forums.phpfreaks.com/topic/220507-how-to-find-session-duration-in-php/#findComment-1147963 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.