Define expiration for each key - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Define expiration for each key (/showthread.php?tid=70575) |
Define expiration for each key - omid_student - 04-29-2018 Hello I need define expiration for each key Example for title => 3000 for id => 20000 I need this feature for define expiration for token that i make it when user login to site Also can i define statistic session id for each session? (i change session id only) I need session id keep until i dont change it no changing with codeigniter Thanks RE: Define expiration for each key - InsiteFX - 04-29-2018 Why not just store a cookie on the users system for the expiration value, encrypted of course. RE: Define expiration for each key - omid_student - 04-29-2018 (04-29-2018, 09:31 AM)InsiteFX Wrote: Why not just store a cookie on the users system for the expiration value, encrypted of course. Oh yes you right OK Now how do i define statistic session id for always? RE: Define expiration for each key - omid_student - 04-29-2018 And important point is that I need save token in session and if save it in cookie so hacker can access to it easy So i have to save to session RE: Define expiration for each key - InsiteFX - 04-30-2018 You need to keep in mind about Session Fixation... So I would leave the CI Sessions alone. If you always need a session id I would create my own class for it and use the database to store the my session id and to store the expiration time. Then also use a cookie to keep track of it all. RE: Define expiration for each key - omid_student - 04-30-2018 (04-30-2018, 03:29 AM)InsiteFX Wrote: You need to keep in mind about Session Fixation... Thank you for your good solution |