Re: [PHP] Generate unique login token

2009-02-09 Thread Stuart
2009/2/10 sean greenslade : > I have a login system that I am coding. I need it to generate a unique token > on login to be stored in the browser's cookie. I currently use a script that > generates a MD5 hash of the current unix timestamp, then checks the mysql > database to see if the token alread

Re: [PHP] Generate unique login token

2009-02-09 Thread Chris
What would be wrong with using the session and getting the session id? That should be unique for each visitor, for as long as they are logged in. Probably wouldn't be useful for repeated visits, but I'm assuming that on next login they would be issued another token anyway? Nothing - I just did

Re: [PHP] Generate unique login token

2009-02-09 Thread Ashley Sheridan
On Tue, 2009-02-10 at 13:09 +1100, Chris wrote: > sean greenslade wrote: > > I have a login system that I am coding. I need it to generate a unique token > > on login to be stored in the browser's cookie. I currently use a script that > > generates a MD5 hash of the current unix timestamp, then che

Re: [PHP] Generate unique login token

2009-02-09 Thread Chris
sean greenslade wrote: I have a login system that I am coding. I need it to generate a unique token on login to be stored in the browser's cookie. I currently use a script that generates a MD5 hash of the current unix timestamp, then checks the mysql database to see if the token already exists. I

Re: [PHP] Generate unique login token

2009-02-09 Thread Eric Butera
On Mon, Feb 9, 2009 at 8:52 PM, sean greenslade wrote: > I have a login system that I am coding. I need it to generate a unique token > on login to be stored in the browser's cookie. I currently use a script that > generates a MD5 hash of the current unix timestamp, then checks the mysql > databas

[PHP] Generate unique login token

2009-02-09 Thread sean greenslade
I have a login system that I am coding. I need it to generate a unique token on login to be stored in the browser's cookie. I currently use a script that generates a MD5 hash of the current unix timestamp, then checks the mysql database to see if the token already exists. It loops this generate/che