[FX.php List] [OFF] Theory of managing sessions

Gjermund Gusland Thorsen ggt667 at gmail.com
Sun Nov 25 02:19:22 MST 2007


Try
---
$pKey = sha1( 'theNeatestSurveyOnEarthByGGT' . date("Y---Y--Y") .
$_SERVER["REMOTE_ADDR"] );
---
It will fail once pr year...

but doing unset($pKey);

will avoid access to the previous login data.

ggt

On Nov 24, 2007 6:08 PM, Jonathan Schwartz <jschwartz at exit445.com> wrote:
> ggt,
>
> I spent two days staring at the code you suggested below...and I have
> to admit I can't make head nor tails of it.
>
> Can you shed some light?
>
> Thx
>
>
> Jonathan
>
>
>
> At 11:25 PM +0100 11/20/07, Gjermund Gusland Thorsen wrote:
> >Tihi, I always did this in a different way, then you guys it seems.
> >
> >I always make my own key as array inside $_SESSION['']
> >
> >example
> >
> >$_SESSION[$pKey]['currentUser'] = $r['data'][key( $r['data'] )]['userID'][0];
> >
> >and when I want to kill the session I use simple stuff like:
> >
> >$_SESSION[$pKey]['currentUser'] = '';
> >
> >or if I will like I want to be brutal:
> >
> >$_SESSION[$pKey] = '';
> >
>
>
> --
>
> Jonathan Schwartz
> Exit 445 Group
> jonathan at exit445.com
> http://www.exit445.com
> 415-381-1852
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>


More information about the FX.php_List mailing list