mr_mind Posted December 17, 2007 Share Posted December 17, 2007 Alright so i have a script which reads to see if you are online based on the file access time of the file which contains your user id #, thr problem with this is that once the idle time (which is required) is up you are marked as logged out and cannot log back in again. All i eed to do is change the file access time every time a user views a page on my website while logged in. so if anyone knows a function which does this directly or indirectly it would be much appreciated. Link to comment https://forums.phpfreaks.com/topic/82105-solved-updating-file-access-time-through-php/ Share on other sites More sharing options...
sculpy Posted December 17, 2007 Share Posted December 17, 2007 Will touch() do it? <?php if (touch($FileName)) { echo "$FileName modification time has been changed to present time"; } else { echo "Sorry, could not change modification time of $FileName"; } ?> Link to comment https://forums.phpfreaks.com/topic/82105-solved-updating-file-access-time-through-php/#findComment-417212 Share on other sites More sharing options...
mr_mind Posted December 17, 2007 Author Share Posted December 17, 2007 solved with: touch(session_save_path() . '/sess_' . session_id()); Link to comment https://forums.phpfreaks.com/topic/82105-solved-updating-file-access-time-through-php/#findComment-417224 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.