07-05-2008, 06:31 PM
|
#12 (permalink)
|
|
The Contributor
Join Date: Mar 2008
Posts: 62
Thanks: 2
|
this just popped in my head as i read the title
i havent read the post because it's kinda long so if someone has said this than im sorry.
this isnt probably the best way to do this for several reasons but its just a start to making something
make a database table that has the rows: ip, key and time
when the user logs in and checks remember me itll log their ip into the database while generating a key and a set time; by using the php time function you can do some math and add time to it for how long they want to stay logged in
when they come back it checks their ip ($_SERVER['REMOTE_ADDR']) against the database and just sets a session to exist..and also if the row, time, is less than the php time function then their remember me is no good anymore and must login again
but that poses a problem of several users across the same ip, like siblings. maybe make a cookie with the username
oh just forget it, its useless and wasteful
except it could have potential to keep the files stored on a users computer to a minimum
im forgetting what im wanting to say as im typing but if i remember than ill add it .. but theres problems i know of
...
just a thought
|
|
|