Welcome Guest, Not a member yet? Register   Sign In
Define expiration for each key
#1

(This post was last modified: 04-29-2018, 06:28 AM by omid_student.)

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
Reply
#2

Why not just store a cookie on the users system for the expiration value, encrypted of course.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(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?
Reply
#4

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
Reply
#5

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.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#6

(04-30-2018, 03:29 AM)InsiteFX Wrote: 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.

Thank you for your good solution
Reply




Theme © iAndrew 2016 - Forum software by © MyBB