RE: [PHP] SESSION's from common computers
| From: | César Aracena | Date: | Sat, 29 Jun 2002 06:37:23 +0000 |
| Subject: | RE: [PHP] SESSION's from common computers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104473@lists.php.net to get a copy of this message | ||
Mission accomplished... Thank you very much... as always.
C.
> -----Original Message-----
> From: John Holmes [mailto:holmes072000@charter.net]
> Sent: Saturday, June 29, 2002 3:34 AM
> To: 'César Aracena'; 'PHP General List'
> Subject: RE: [PHP] SESSION's from common computers
>
> Depends how you have it set up now. Usually, once a session is valid,
> you set a variable within it to check for.
>
> <?
> Session_start();
> If(isset($_SESSION['logged_in']))
> ...
> ?>
>
> If they are requesting login.php, but they already have a session,
then
> destroy that one with session_destroy(). It's really a mute point,
> though, because if they are already going to log in, they'll get a new
> session, anyhow, just like anyone else logging in.
>
> ---John Holmes...
>
> > -----Original Message-----
> > From: César Aracena [mailto:icaam@icaam.com.ar]
> > Sent: Saturday, June 29, 2002 2:28 AM
> > To: 'PHP General List'
> > Subject: RE: [PHP] SESSION's from common computers
> >
> > > If the user even decides to log in as themselves, you can see if a
> > > cookie/session was sent and delete that cookie/session before you
> let
> > > the other person log in.
> >
> > [César L. Aracena]
> >
> > Ok... I see... And what should I do to see if that session was sent?
> How
> > should I look that up in the function list of www.php.net?
> >
> > Thanks, C.
> >
> > >
> > > ---John Holmes...
> > >
> > > > -----Original Message-----
> > > > From: César Aracena [mailto:icaam@icaam.com.ar]
> > > > Sent: Saturday, June 29, 2002 2:11 AM
> > > > To: 'PHP General List'
> > > > Subject: RE: [PHP] SESSION's from common computers
> > > >
> > > > Got it but... What happens if someone else grabs the computer
that
> > my
> > > > user was sitting at 2 minutes before, leaving the window opened
> and
> > > > after he grabs the new machine open a new session... isn't PHP
> > capable
> > > > of determining that the same user is trying to open a 2nd
session
> no
> > > > matter what the cookie tells it? I mean by his username.
> > > >
> > > > C.
> > > >
> > > > > -----Original Message-----
> > > > > From: John Holmes [mailto:holmes072000@charter.net]
> > > > > Sent: Saturday, June 29, 2002 2:36 AM
> > > > > To: 'César Aracena'; 'PHP General List'
> > > > > Subject: RE: [PHP] SESSION's from common computers
> > > > >
> > > > > You really can't do anything besides saying that after X
> minutes,
> > > > well,
> > > > > you were idle, so restart your session. Once you send them the
> > page,
> > > > you
> > > > > don't know if they are reading it or have left the table. All
> you
> > > can
> > > > do
> > > > > is decide on the next request whether too much time has
passed.
> > > > >
> > > > > As for the new computer, they'll have to start a new session
> there
> > > > > automatically, because they won't have the same cookie
matching
> > the
> > > > > session ID from the first computer.
> > > > >
> > > > > ---John Holmes...
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: César Aracena [mailto:icaam@icaam.com.ar]
> > > > > > Sent: Saturday, June 29, 2002 1:24 AM
> > > > > > To: PHP General List
> > > > > > Subject: [PHP] SESSION's from common computers
> > > > > >
> > > > > > Hi all.
> > > > > >
> > > > > > I have a question about sessions
which is the best way to
> close
> > a
> > > > > > session if one its opened for a certain user and then this
> user
> > > > > changes
> > > > > > to another computer? I guess that I could manage with
> > > > > session_start_time
> > > > > > and session_end_time fields in the DB, and tell the script
to
> > see
> > > if
> > > > > the
> > > > > > opened session hasnt been closed
then close it and open a
> new
> > > one.
> > > > > >
> > > > > > Does this make any sense? Is there a better way to do this?
I
> > want
> > > > to
> > > > > > know this because many users actually use cyber-coffees
> > computers
> > > to
> > > > > > access web sites and Ive seen them leaving their chair with
> the
> > > > > windows
> > > > > > still opened and changing to another pc.
> > > > > >
> > > > > > Thanks in advance,
> > > > > >
> > > > > > <mailto:webmaster@icaam.com.ar>
> > > > > > Cesar Aracena
> > > > > > CE / MCSE+I
> > > > > > Neuquen, Argentina
> > > > > > +54.299.6356688
> > > > > > +54.299.4466621
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit:
> > > > > http://www.php.net/unsub.php
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit:
> > > > http://www.php.net/unsub.php
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php