| Author |
Sharing a session between two machines
|
|
| Lekeas GK 2006-03-26, 7:57 am |
| Is this possible? What I want to do is have a user who once logged on, he
should not be able to log in again. I can use sessions to achieve that on
a single machine, but what happens if I need to use two different ones?
Thanks,
George
| |
| Johannes Wienke 2006-03-26, 7:57 am |
| Am 26.03.2006 13:08 schrieb Lekeas GK:
> Is this possible? What I want to do is have a user who once logged
> on, he should not be able to log in again.
This can be done by blocking a new login as long as he is logged in.
> I can use sessions to achieve that on a single machine, but what
> happens if I need to use two different ones?
The only possibiliy I see is that the user has to copy the whole url
with his session-id. So you must deactivate the use of cookies.
But normally sessions are specially designed to assign _one_ special
user-agent to the server and not one user on different systems.
| |
| Colin McKinnon 2006-03-27, 6:57 pm |
| Lekeas GK wrote:
> Is this possible? What I want to do is have a user who once logged on, he
> should not be able to log in again. I can use sessions to achieve that on
> a single machine, but what happens if I need to use two different ones?
>
Either use shared storage for the sessions and the same hostname on both
machines or write your own session handler - this latter is fairly easy,
well documented in the PHP manual and can be written in PHP.
C.
| |
| Lekeas GK 2006-03-29, 6:57 pm |
| What do you mean by shared hostage? Get the session id generated the first
time and refer to that session in subsequent calls?
Regards,
George
On Mon, 27 Mar 2006 Lekeas GK wrote...
>From: Colin McKinnon
> <colin.thisisnotmysurname@ntlworld.deletemeunlessURaBot.com>
>Date: Mon, 27 Mar 2006 21:32:24 GMT
>Subject: Re: Sharing a session between two machines
>
>Lekeas GK wrote:
>
>
>Either use shared storage for the sessions and the same hostname on both
>machines or write your own session handler - this latter is fairly easy,
>well documented in the PHP manual and can be written in PHP.
>
>C.
>
| |
| Lekeas GK 2006-03-29, 6:57 pm |
| How can you block a login?
George
On Sun, 26 Mar 2006 Lekeas GK wrote...
>From: Johannes Wienke <spam@semipol.de>
>Date: Sun, 26 Mar 2006 14:26:15 +0200
>Subject: Re: Sharing a session between two machines
>
>Am 26.03.2006 13:08 schrieb Lekeas GK:
>
>This can be done by blocking a new login as long as he is logged in.
>
>
>The only possibiliy I see is that the user has to copy the whole url
>with his session-id. So you must deactivate the use of cookies.
>But normally sessions are specially designed to assign _one_ special
>user-agent to the server and not one user on different systems.
>
| |
| Johannes Wienke 2006-03-29, 6:57 pm |
| Am 29.03.2006 20:49 schrieb Lekeas GK:
> How can you block a login?
Save the users who are logged in in a database table for a certain time
and while logging in chek, if the user is allready in that table.
|
|
|
|