Aureole Posted October 5, 2007 Share Posted October 5, 2007 Right now I have it so session variables are only set once you log in so I can't have guest sessions so I have no way of tracking guests... but I want to have guest sessions, I'm just not really sure where to start - anyone got any pointers? I've searched Google but no luck... Quote Link to comment https://forums.phpfreaks.com/topic/71899-guest-sessions/ Share on other sites More sharing options...
teng84 Posted October 5, 2007 Share Posted October 5, 2007 update your db like when the users log then insert it in your then check if the user is not active in an x time dlete the users name Quote Link to comment https://forums.phpfreaks.com/topic/71899-guest-sessions/#findComment-362186 Share on other sites More sharing options...
Aureole Posted October 5, 2007 Author Share Posted October 5, 2007 Don't think you get it, I need to track people who AREN'T logged in so I can show for example "x guests online" but I'm not sure how to approach it... Quote Link to comment https://forums.phpfreaks.com/topic/71899-guest-sessions/#findComment-362187 Share on other sites More sharing options...
teng84 Posted October 5, 2007 Share Posted October 5, 2007 Don't think you get it, lol yeah i dont lol maybe you can do something like this create a table that will contain all the id when they log or active and join that table into your real table having the complete data in that case you will be able to show the active and non active ??? Quote Link to comment https://forums.phpfreaks.com/topic/71899-guest-sessions/#findComment-362194 Share on other sites More sharing options...
Aureole Posted October 5, 2007 Author Share Posted October 5, 2007 Eh I don't get what you're saying, it's all a bit mumbled up... but thanks anyway. Quote Link to comment https://forums.phpfreaks.com/topic/71899-guest-sessions/#findComment-362197 Share on other sites More sharing options...
web_design_sydney Posted October 5, 2007 Share Posted October 5, 2007 Eh I don't get what you're saying, it's all a bit mumbled up... but thanks anyway. You need something along the line of userid with a table that tracks logged_in (yes/no) and access_time (X) and current_time (Y). For each page load for userid where logged_in = yes get inactive time, where inactive time y - x > z make logged in = no. You can record access_time every time a page is accessed and call current time with a php script. Does that help? Quote Link to comment https://forums.phpfreaks.com/topic/71899-guest-sessions/#findComment-362232 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.