Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2158 > unrolled thread

User login status?

Started byCo <vonclausowitz@gmail.com>
First post2011-06-14 13:22 -0700
Last post2011-06-18 11:46 -0400
Articles 20 — 5 participants

Back to article view | Back to comp.lang.php


Contents

  User login status? Co <vonclausowitz@gmail.com> - 2011-06-14 13:22 -0700
    Re: User login status? Luuk <Luuk@invalid.lan> - 2011-06-14 22:57 +0200
    Re: User login status? Luuk <Luuk@invalid.lan> - 2011-06-14 23:00 +0200
      Re: User login status? Co <vonclausowitz@gmail.com> - 2011-06-14 14:09 -0700
    Re: User login status? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-14 18:57 -0400
      Re: User login status? Co <vonclausowitz@gmail.com> - 2011-06-14 22:02 -0700
        Re: User login status? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-15 06:02 -0400
      Re: User login status? Luuk <Luuk@invalid.lan> - 2011-06-15 20:33 +0200
        Re: User login status? Co <vonclausowitz@gmail.com> - 2011-06-17 04:25 -0700
          Re: User login status? Luuk <Luuk@invalid.lan> - 2011-06-17 20:53 +0200
            Re: User login status? Bill B <me@privacy.net> - 2011-06-17 15:13 -0400
              Re: User login status? Luuk <Luuk@invalid.lan> - 2011-06-17 22:06 +0200
                Re: User login status? Bill B <me@privacy.net> - 2011-06-17 16:39 -0400
                  Re: User login status? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-17 16:47 -0400
                    Re: User login status? Bill B <me@privacy.net> - 2011-06-17 17:07 -0400
                      Re: User login status? Tim Streater <timstreater@waitrose.com> - 2011-06-17 22:47 +0100
                      Re: User login status? Jerry Stuckle <jstucklex@attglobal.net> - 2011-06-17 20:25 -0400
                        Re: User login status? Bill B <me@privacy.net> - 2011-06-18 00:15 -0400
                          Re: User login status? Luuk <Luuk@invalid.lan> - 2011-06-18 13:37 +0200
                            Re: User login status? Bill B <me@privacy.net> - 2011-06-18 11:46 -0400

#2158 — User login status?

FromCo <vonclausowitz@gmail.com>
Date2011-06-14 13:22 -0700
SubjectUser login status?
Message-ID<545443a6-2c1b-4fa9-902a-967357680506@e7g2000vbw.googlegroups.com>
Hi All,

I have this code that will change one field of the users record when
he logs in:

mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
WHERE id='$id' LIMIT 1");

This way we can display all the users who are logged in on the main
page.
When the user logs of the record will be changed again:

mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");

However what if the user just forgets to log off, then he is gone but
his status is still logged=1.
Is there a way to make sure the user status is changed even when he
forgets to log off?

Marco

[toc] | [next] | [standalone]


#2159

FromLuuk <Luuk@invalid.lan>
Date2011-06-14 22:57 +0200
Message-ID<4df7cb47$0$49045$e4fe514c@news.xs4all.nl>
In reply to#2158
On 14-06-2011 22:22, Co wrote:
> I have this code that will change one field of the users record when
> he logs in:
> 

one field?

> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
> WHERE id='$id' LIMIT 1");

The above will actually change TWO fields of the users record.

-- 
Luuk

[toc] | [prev] | [next] | [standalone]


#2160

FromLuuk <Luuk@invalid.lan>
Date2011-06-14 23:00 +0200
Message-ID<4df7cbdd$0$49045$e4fe514c@news.xs4all.nl>
In reply to#2158
On 14-06-2011 22:22, Co wrote:
> Hi All,
> 
> I have this code that will change one field of the users record when
> he logs in:
> 
> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
> WHERE id='$id' LIMIT 1");
> 
> This way we can display all the users who are logged in on the main
> page.
> When the user logs of the record will be changed again:
> 
> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");
> 
> However what if the user just forgets to log off, then he is gone but
> his status is still logged=1.
> Is there a way to make sure the user status is changed even when he
> forgets to log off?
> 
> Marco

set them to logged='0' when the did not click anywhere on the site for
the last 5 minutes, or 10 minutes, or whatever you think would be nice...

-- 
Luuk

[toc] | [prev] | [next] | [standalone]


#2161

FromCo <vonclausowitz@gmail.com>
Date2011-06-14 14:09 -0700
Message-ID<99a8b908-4a15-43d0-825a-0d826e2ec6f2@z37g2000vbl.googlegroups.com>
In reply to#2160
On 14 jun, 23:00, Luuk <L...@invalid.lan> wrote:
> On 14-06-2011 22:22, Co wrote:
>
>
>
>
>
>
>
>
>
> > Hi All,
>
> > I have this code that will change one field of the users record when
> > he logs in:
>
> > mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
> > WHERE id='$id' LIMIT 1");
>
> > This way we can display all the users who are logged in on the main
> > page.
> > When the user logs of the record will be changed again:
>
> > mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");
>
> > However what if the user just forgets to log off, then he is gone but
> > his status is still logged=1.
> > Is there a way to make sure the user status is changed even when he
> > forgets to log off?
>
> > Marco
>
> set them to logged='0' when the did not click anywhere on the site for
> the last 5 minutes, or 10 minutes, or whatever you think would be nice...
>
> --
> Luuk

You are right Luuk, it's two fields.
Is there some kind of timer code I need to do that?

Marco

[toc] | [prev] | [next] | [standalone]


#2163

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-06-14 18:57 -0400
Message-ID<it8p1r$iff$1@dont-email.me>
In reply to#2158
On 6/14/2011 4:22 PM, Co wrote:
> Hi All,
>
> I have this code that will change one field of the users record when
> he logs in:
>
> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
> WHERE id='$id' LIMIT 1");
>
> This way we can display all the users who are logged in on the main
> page.
> When the user logs of the record will be changed again:
>
> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");
>
> However what if the user just forgets to log off, then he is gone but
> his status is still logged=1.
> Is there a way to make sure the user status is changed even when he
> forgets to log off?
>
> Marco

The web is stateless - there is no such concept as "logged in" or not. 
And there is no way to know if the user is still reading your page, has 
gone to coffee (or lunch), closed the browser or even shut off the 
computer.  So there is no way to determine how many people are logged in 
or not - and sites which claim to do that are pretty much guessing.

The best you can do is create your own custom session handler which 
stores the data in a database instead of the file system.  Then you can 
assume as long as the session is active, the user is logged in.  When 
the session expires, the user is logged out.  Still not real accurate, 
but the best you can do.

Just a warning - custom session handlers can be complex and pretty much 
beyond what you can do in a newsgroup.

Otherwise, Luuk's response is as good as any.  And it will be about as 
accurate as anything.  You need a cron job to handle the deletion of rows.



-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#2173

FromCo <vonclausowitz@gmail.com>
Date2011-06-14 22:02 -0700
Message-ID<d80baaba-24f2-490e-9ba7-95a591e68f1a@z37g2000vbl.googlegroups.com>
In reply to#2163
On 15 jun, 00:57, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 6/14/2011 4:22 PM, Co wrote:
>
>
>
>
>
>
>
>
>
> > Hi All,
>
> > I have this code that will change one field of the users record when
> > he logs in:
>
> > mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
> > WHERE id='$id' LIMIT 1");
>
> > This way we can display all the users who are logged in on the main
> > page.
> > When the user logs of the record will be changed again:
>
> > mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");
>
> > However what if the user just forgets to log off, then he is gone but
> > his status is still logged=1.
> > Is there a way to make sure the user status is changed even when he
> > forgets to log off?
>
> > Marco
>
> The web is stateless - there is no such concept as "logged in" or not.
> And there is no way to know if the user is still reading your page, has
> gone to coffee (or lunch), closed the browser or even shut off the
> computer.  So there is no way to determine how many people are logged in
> or not - and sites which claim to do that are pretty much guessing.
>
> The best you can do is create your own custom session handler which
> stores the data in a database instead of the file system.  Then you can
> assume as long as the session is active, the user is logged in.  When
> the session expires, the user is logged out.  Still not real accurate,
> but the best you can do.
>
> Just a warning - custom session handlers can be complex and pretty much
> beyond what you can do in a newsgroup.
>
> Otherwise, Luuk's response is as good as any.  And it will be about as
> accurate as anything.  You need a cron job to handle the deletion of rows.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

I have been looking at these cron jobs.
I think I have to create these on the server but I haven't been able
to find them there.

Marco

[toc] | [prev] | [next] | [standalone]


#2177

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-06-15 06:02 -0400
Message-ID<ita009$na0$3@dont-email.me>
In reply to#2173
On 6/15/2011 1:02 AM, Co wrote:
> On 15 jun, 00:57, Jerry Stuckle<jstuck...@attglobal.net>  wrote:
>> On 6/14/2011 4:22 PM, Co wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> Hi All,
>>
>>> I have this code that will change one field of the users record when
>>> he logs in:
>>
>>> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
>>> WHERE id='$id' LIMIT 1");
>>
>>> This way we can display all the users who are logged in on the main
>>> page.
>>> When the user logs of the record will be changed again:
>>
>>> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");
>>
>>> However what if the user just forgets to log off, then he is gone but
>>> his status is still logged=1.
>>> Is there a way to make sure the user status is changed even when he
>>> forgets to log off?
>>
>>> Marco
>>
>> The web is stateless - there is no such concept as "logged in" or not.
>> And there is no way to know if the user is still reading your page, has
>> gone to coffee (or lunch), closed the browser or even shut off the
>> computer.  So there is no way to determine how many people are logged in
>> or not - and sites which claim to do that are pretty much guessing.
>>
>> The best you can do is create your own custom session handler which
>> stores the data in a database instead of the file system.  Then you can
>> assume as long as the session is active, the user is logged in.  When
>> the session expires, the user is logged out.  Still not real accurate,
>> but the best you can do.
>>
>> Just a warning - custom session handlers can be complex and pretty much
>> beyond what you can do in a newsgroup.
>>
>> Otherwise, Luuk's response is as good as any.  And it will be about as
>> accurate as anything.  You need a cron job to handle the deletion of rows.
>>
>
> I have been looking at these cron jobs.
> I think I have to create these on the server but I haven't been able
> to find them there.
>
> Marco

That is true - cron jobs (on Linux - Scheduled Tasks on Windows) are 
triggered by the OS.  Your hosting company may or may not support them.

For more information you need to learn about Linux (or Windows) 
administration.  Check the OS-related newsgroups for book recommendations.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#2199

FromLuuk <Luuk@invalid.lan>
Date2011-06-15 20:33 +0200
Message-ID<4df8fae9$0$49047$e4fe514c@news.xs4all.nl>
In reply to#2163
On 15-06-2011 00:57, Jerry Stuckle wrote:
> On 6/14/2011 4:22 PM, Co wrote:
>> Hi All,
>>
>> I have this code that will change one field of the users record when
>> he logs in:
>>
>> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
>> WHERE id='$id' LIMIT 1");
>>
>> This way we can display all the users who are logged in on the main
>> page.
>> When the user logs of the record will be changed again:
>>
>> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");
>>
>> However what if the user just forgets to log off, then he is gone but
>> his status is still logged=1.
>> Is there a way to make sure the user status is changed even when he
>> forgets to log off?
>>
>> Marco
> 
> The web is stateless - there is no such concept as "logged in" or not.
> And there is no way to know if the user is still reading your page, has
> gone to coffee (or lunch), closed the browser or even shut off the
> computer.  So there is no way to determine how many people are logged in
> or not - and sites which claim to do that are pretty much guessing.
> 
> The best you can do is create your own custom session handler which
> stores the data in a database instead of the file system.  Then you can
> assume as long as the session is active, the user is logged in.  When
> the session expires, the user is logged out.  Still not real accurate,
> but the best you can do.
> 
> Just a warning - custom session handlers can be complex and pretty much
> beyond what you can do in a newsgroup.
> 
> Otherwise, Luuk's response is as good as any.  And it will be about as
> accurate as anything.  You need a cron job to handle the deletion of rows.
> 
> 
> 

You could also check if users are still logged on, just before gathering
the list of logged on users...
(and when someone logs in)

This way your database will not give the correct 'state' to you, but to
the web-users it will, because you put all the changes in there before
you show anything to the web-users...


-- 
Luuk

[toc] | [prev] | [next] | [standalone]


#2217

FromCo <vonclausowitz@gmail.com>
Date2011-06-17 04:25 -0700
Message-ID<a8bbae4b-cf13-4ce1-b048-1f5df610756d@25g2000yqn.googlegroups.com>
In reply to#2199
On 15 jun, 20:33, Luuk <L...@invalid.lan> wrote:
> On 15-06-2011 00:57, Jerry Stuckle wrote:
>
>
>
>
>
>
>
>
>
> > On 6/14/2011 4:22 PM, Co wrote:
> >> Hi All,
>
> >> I have this code that will change one field of the users record when
> >> he logs in:
>
> >> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
> >> WHERE id='$id' LIMIT 1");
>
> >> This way we can display all the users who are logged in on the main
> >> page.
> >> When the user logs of the record will be changed again:
>
> >> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");
>
> >> However what if the user just forgets to log off, then he is gone but
> >> his status is still logged=1.
> >> Is there a way to make sure the user status is changed even when he
> >> forgets to log off?
>
> >> Marco
>
> > The web is stateless - there is no such concept as "logged in" or not.
> > And there is no way to know if the user is still reading your page, has
> > gone to coffee (or lunch), closed the browser or even shut off the
> > computer.  So there is no way to determine how many people are logged in
> > or not - and sites which claim to do that are pretty much guessing.
>
> > The best you can do is create your own custom session handler which
> > stores the data in a database instead of the file system.  Then you can
> > assume as long as the session is active, the user is logged in.  When
> > the session expires, the user is logged out.  Still not real accurate,
> > but the best you can do.
>
> > Just a warning - custom session handlers can be complex and pretty much
> > beyond what you can do in a newsgroup.
>
> > Otherwise, Luuk's response is as good as any.  And it will be about as
> > accurate as anything.  You need a cron job to handle the deletion of rows.
>
> You could also check if users are still logged on, just before gathering
> the list of logged on users...
> (and when someone logs in)
>
> This way your database will not give the correct 'state' to you, but to
> the web-users it will, because you put all the changes in there before
> you show anything to the web-users...
>
> --
> Luuk

Luuk,

I like the idea but I don't know exactly how to check if users are
still logged in?

Marco

[toc] | [prev] | [next] | [standalone]


#2224

FromLuuk <Luuk@invalid.lan>
Date2011-06-17 20:53 +0200
Message-ID<4dfba2a8$0$49181$e4fe514c@news.xs4all.nl>
In reply to#2217
On 17-06-2011 13:25, Co wrote:
> On 15 jun, 20:33, Luuk <L...@invalid.lan> wrote:
>> On 15-06-2011 00:57, Jerry Stuckle wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>> On 6/14/2011 4:22 PM, Co wrote:
>>>> Hi All,
>>
>>>> I have this code that will change one field of the users record when
>>>> he logs in:
>>
>>>> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
>>>> WHERE id='$id' LIMIT 1");
>>
>>>> This way we can display all the users who are logged in on the main
>>>> page.
>>>> When the user logs of the record will be changed again:
>>
>>>> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");
>>
>>>> However what if the user just forgets to log off, then he is gone but
>>>> his status is still logged=1.
>>>> Is there a way to make sure the user status is changed even when he
>>>> forgets to log off?
>>
>>>> Marco
>>
>>> The web is stateless - there is no such concept as "logged in" or not.
>>> And there is no way to know if the user is still reading your page, has
>>> gone to coffee (or lunch), closed the browser or even shut off the
>>> computer.  So there is no way to determine how many people are logged in
>>> or not - and sites which claim to do that are pretty much guessing.
>>
>>> The best you can do is create your own custom session handler which
>>> stores the data in a database instead of the file system.  Then you can
>>> assume as long as the session is active, the user is logged in.  When
>>> the session expires, the user is logged out.  Still not real accurate,
>>> but the best you can do.
>>
>>> Just a warning - custom session handlers can be complex and pretty much
>>> beyond what you can do in a newsgroup.
>>
>>> Otherwise, Luuk's response is as good as any.  And it will be about as
>>> accurate as anything.  You need a cron job to handle the deletion of rows.
>>
>> You could also check if users are still logged on, just before gathering
>> the list of logged on users...
>> (and when someone logs in)
>>
>> This way your database will not give the correct 'state' to you, but to
>> the web-users it will, because you put all the changes in there before
>> you show anything to the web-users...
>>
>> --
>> Luuk
> 
> Luuk,
> 
> I like the idea but I don't know exactly how to check if users are
> still logged in?
> 
> Marco

i meant to logg the user off when they have not clicked for a defined
number of minutes (after 10, or 15 minutes, or so....)

-- 
Luuk

[toc] | [prev] | [next] | [standalone]


#2225

FromBill B <me@privacy.net>
Date2011-06-17 15:13 -0400
Message-ID<itg8vk$r4$2@dont-email.me>
In reply to#2224
On 6/17/2011 2:53 PM, Luuk wrote:
> On 17-06-2011 13:25, Co wrote:
>> On 15 jun, 20:33, Luuk<L...@invalid.lan>  wrote:
>>> On 15-06-2011 00:57, Jerry Stuckle wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>> On 6/14/2011 4:22 PM, Co wrote:
>>>>> Hi All,
>>>
>>>>> I have this code that will change one field of the users record when
>>>>> he logs in:
>>>
>>>>> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
>>>>> WHERE id='$id' LIMIT 1");
>>>
>>>>> This way we can display all the users who are logged in on the main
>>>>> page.
>>>>> When the user logs of the record will be changed again:
>>>
>>>>> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT 1");
>>>
>>>>> However what if the user just forgets to log off, then he is gone but
>>>>> his status is still logged=1.
>>>>> Is there a way to make sure the user status is changed even when he
>>>>> forgets to log off?
>>>
>>>>> Marco
>>>
>>>> The web is stateless - there is no such concept as "logged in" or not.
>>>> And there is no way to know if the user is still reading your page, has
>>>> gone to coffee (or lunch), closed the browser or even shut off the
>>>> computer.  So there is no way to determine how many people are logged in
>>>> or not - and sites which claim to do that are pretty much guessing.
>>>
>>>> The best you can do is create your own custom session handler which
>>>> stores the data in a database instead of the file system.  Then you can
>>>> assume as long as the session is active, the user is logged in.  When
>>>> the session expires, the user is logged out.  Still not real accurate,
>>>> but the best you can do.
>>>
>>>> Just a warning - custom session handlers can be complex and pretty much
>>>> beyond what you can do in a newsgroup.
>>>
>>>> Otherwise, Luuk's response is as good as any.  And it will be about as
>>>> accurate as anything.  You need a cron job to handle the deletion of rows.
>>>
>>> You could also check if users are still logged on, just before gathering
>>> the list of logged on users...
>>> (and when someone logs in)
>>>
>>> This way your database will not give the correct 'state' to you, but to
>>> the web-users it will, because you put all the changes in there before
>>> you show anything to the web-users...
>>>
>>> --
>>> Luuk
>>
>> Luuk,
>>
>> I like the idea but I don't know exactly how to check if users are
>> still logged in?
>>
>> Marco
>
> i meant to logg the user off when they have not clicked for a defined
> number of minutes (after 10, or 15 minutes, or so....)


Any thoughts on how this would work with an <object> that points to a 
remote swf? The person might be running the swf for some time without 
causing any activity on the page that contains the <object>.

Bill B

[toc] | [prev] | [next] | [standalone]


#2227

FromLuuk <Luuk@invalid.lan>
Date2011-06-17 22:06 +0200
Message-ID<4dfbb3a8$0$49176$e4fe514c@news.xs4all.nl>
In reply to#2225
On 17-06-2011 21:13, Bill B wrote:
> On 6/17/2011 2:53 PM, Luuk wrote:
>> On 17-06-2011 13:25, Co wrote:
>>> On 15 jun, 20:33, Luuk<L...@invalid.lan>  wrote:
>>>> On 15-06-2011 00:57, Jerry Stuckle wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> On 6/14/2011 4:22 PM, Co wrote:
>>>>>> Hi All,
>>>>
>>>>>> I have this code that will change one field of the users record when
>>>>>> he logs in:
>>>>
>>>>>> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
>>>>>> WHERE id='$id' LIMIT 1");
>>>>
>>>>>> This way we can display all the users who are logged in on the main
>>>>>> page.
>>>>>> When the user logs of the record will be changed again:
>>>>
>>>>>> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT
>>>>>> 1");
>>>>
>>>>>> However what if the user just forgets to log off, then he is gone but
>>>>>> his status is still logged=1.
>>>>>> Is there a way to make sure the user status is changed even when he
>>>>>> forgets to log off?
>>>>
>>>>>> Marco
>>>>
>>>>> The web is stateless - there is no such concept as "logged in" or not.
>>>>> And there is no way to know if the user is still reading your page,
>>>>> has
>>>>> gone to coffee (or lunch), closed the browser or even shut off the
>>>>> computer.  So there is no way to determine how many people are
>>>>> logged in
>>>>> or not - and sites which claim to do that are pretty much guessing.
>>>>
>>>>> The best you can do is create your own custom session handler which
>>>>> stores the data in a database instead of the file system.  Then you
>>>>> can
>>>>> assume as long as the session is active, the user is logged in.  When
>>>>> the session expires, the user is logged out.  Still not real accurate,
>>>>> but the best you can do.
>>>>
>>>>> Just a warning - custom session handlers can be complex and pretty
>>>>> much
>>>>> beyond what you can do in a newsgroup.
>>>>
>>>>> Otherwise, Luuk's response is as good as any.  And it will be about as
>>>>> accurate as anything.  You need a cron job to handle the deletion
>>>>> of rows.
>>>>
>>>> You could also check if users are still logged on, just before
>>>> gathering
>>>> the list of logged on users...
>>>> (and when someone logs in)
>>>>
>>>> This way your database will not give the correct 'state' to you, but to
>>>> the web-users it will, because you put all the changes in there before
>>>> you show anything to the web-users...
>>>>
>>>> -- 
>>>> Luuk
>>>
>>> Luuk,
>>>
>>> I like the idea but I don't know exactly how to check if users are
>>> still logged in?
>>>
>>> Marco
>>
>> i meant to logg the user off when they have not clicked for a defined
>> number of minutes (after 10, or 15 minutes, or so....)
> 
> 
> Any thoughts on how this would work with an <object> that points to a
> remote swf? The person might be running the swf for some time without
> causing any activity on the page that contains the <object>.
> 
> Bill B
> 
> 

swf has nothing to do with PHP.... ;)

I'm not into swf-stuff.....



-- 
Luuk

[toc] | [prev] | [next] | [standalone]


#2228

FromBill B <me@privacy.net>
Date2011-06-17 16:39 -0400
Message-ID<itge1u$3qd$1@dont-email.me>
In reply to#2227
On 6/17/2011 4:06 PM, Luuk wrote:
> On 17-06-2011 21:13, Bill B wrote:
>> On 6/17/2011 2:53 PM, Luuk wrote:
>>> On 17-06-2011 13:25, Co wrote:
>>>> On 15 jun, 20:33, Luuk<L...@invalid.lan>   wrote:
>>>>> On 15-06-2011 00:57, Jerry Stuckle wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> On 6/14/2011 4:22 PM, Co wrote:
>>>>>>> Hi All,
>>>>>
>>>>>>> I have this code that will change one field of the users record when
>>>>>>> he logs in:
>>>>>
>>>>>>> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
>>>>>>> WHERE id='$id' LIMIT 1");
>>>>>
>>>>>>> This way we can display all the users who are logged in on the main
>>>>>>> page.
>>>>>>> When the user logs of the record will be changed again:
>>>>>
>>>>>>> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT
>>>>>>> 1");
>>>>>
>>>>>>> However what if the user just forgets to log off, then he is gone but
>>>>>>> his status is still logged=1.
>>>>>>> Is there a way to make sure the user status is changed even when he
>>>>>>> forgets to log off?
>>>>>
>>>>>>> Marco
>>>>>
>>>>>> The web is stateless - there is no such concept as "logged in" or not.
>>>>>> And there is no way to know if the user is still reading your page,
>>>>>> has
>>>>>> gone to coffee (or lunch), closed the browser or even shut off the
>>>>>> computer.  So there is no way to determine how many people are
>>>>>> logged in
>>>>>> or not - and sites which claim to do that are pretty much guessing.
>>>>>
>>>>>> The best you can do is create your own custom session handler which
>>>>>> stores the data in a database instead of the file system.  Then you
>>>>>> can
>>>>>> assume as long as the session is active, the user is logged in.  When
>>>>>> the session expires, the user is logged out.  Still not real accurate,
>>>>>> but the best you can do.
>>>>>
>>>>>> Just a warning - custom session handlers can be complex and pretty
>>>>>> much
>>>>>> beyond what you can do in a newsgroup.
>>>>>
>>>>>> Otherwise, Luuk's response is as good as any.  And it will be about as
>>>>>> accurate as anything.  You need a cron job to handle the deletion
>>>>>> of rows.
>>>>>
>>>>> You could also check if users are still logged on, just before
>>>>> gathering
>>>>> the list of logged on users...
>>>>> (and when someone logs in)
>>>>>
>>>>> This way your database will not give the correct 'state' to you, but to
>>>>> the web-users it will, because you put all the changes in there before
>>>>> you show anything to the web-users...
>>>>>
>>>>> --
>>>>> Luuk
>>>>
>>>> Luuk,
>>>>
>>>> I like the idea but I don't know exactly how to check if users are
>>>> still logged in?
>>>>
>>>> Marco
>>>
>>> i meant to logg the user off when they have not clicked for a defined
>>> number of minutes (after 10, or 15 minutes, or so....)
>>
>>
>> Any thoughts on how this would work with an<object>  that points to a
>> remote swf? The person might be running the swf for some time without
>> causing any activity on the page that contains the<object>.
>>
>> Bill B
>>
>>
>
> swf has nothing to do with PHP.... ;)
>
> I'm not into swf-stuff.....

The page in question looks like this:
<html>
</html?
<body>
<?php
   get $gamepath $game from $_SESSION variables
?>
<object width type
data=http:domain/$gamepath/$game/game.swf
param name = some stuff
</object>
</body>
</html>

So, the question, as I understand it, is how to monitor this page for 
the inactivity you referred to earlier, when the user could be playing 
the swf based game and not move off the page for a while.

If, for example:

<?php
while $seconds_since_last click <= $inactivity_limit;
     do nothing
endwhile;
logoff_user();
?>

would not the focus on the <object> cause the inactivity limit to be 
reached [potentially] before the person is finished with the game?

Unless I'm way off, seems like a PHP question to me.

Bill B

[toc] | [prev] | [next] | [standalone]


#2230

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-06-17 16:47 -0400
Message-ID<itgegj$5vr$2@dont-email.me>
In reply to#2228
On 6/17/2011 4:39 PM, Bill B wrote:
> On 6/17/2011 4:06 PM, Luuk wrote:
>> On 17-06-2011 21:13, Bill B wrote:
>>> On 6/17/2011 2:53 PM, Luuk wrote:
>>>> On 17-06-2011 13:25, Co wrote:
>>>>> On 15 jun, 20:33, Luuk<L...@invalid.lan> wrote:
>>>>>> On 15-06-2011 00:57, Jerry Stuckle wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> On 6/14/2011 4:22 PM, Co wrote:
>>>>>>>> Hi All,
>>>>>>
>>>>>>>> I have this code that will change one field of the users record
>>>>>>>> when
>>>>>>>> he logs in:
>>>>>>
>>>>>>>> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
>>>>>>>> WHERE id='$id' LIMIT 1");
>>>>>>
>>>>>>>> This way we can display all the users who are logged in on the main
>>>>>>>> page.
>>>>>>>> When the user logs of the record will be changed again:
>>>>>>
>>>>>>>> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT
>>>>>>>> 1");
>>>>>>
>>>>>>>> However what if the user just forgets to log off, then he is
>>>>>>>> gone but
>>>>>>>> his status is still logged=1.
>>>>>>>> Is there a way to make sure the user status is changed even when he
>>>>>>>> forgets to log off?
>>>>>>
>>>>>>>> Marco
>>>>>>
>>>>>>> The web is stateless - there is no such concept as "logged in" or
>>>>>>> not.
>>>>>>> And there is no way to know if the user is still reading your page,
>>>>>>> has
>>>>>>> gone to coffee (or lunch), closed the browser or even shut off the
>>>>>>> computer. So there is no way to determine how many people are
>>>>>>> logged in
>>>>>>> or not - and sites which claim to do that are pretty much guessing.
>>>>>>
>>>>>>> The best you can do is create your own custom session handler which
>>>>>>> stores the data in a database instead of the file system. Then you
>>>>>>> can
>>>>>>> assume as long as the session is active, the user is logged in. When
>>>>>>> the session expires, the user is logged out. Still not real
>>>>>>> accurate,
>>>>>>> but the best you can do.
>>>>>>
>>>>>>> Just a warning - custom session handlers can be complex and pretty
>>>>>>> much
>>>>>>> beyond what you can do in a newsgroup.
>>>>>>
>>>>>>> Otherwise, Luuk's response is as good as any. And it will be
>>>>>>> about as
>>>>>>> accurate as anything. You need a cron job to handle the deletion
>>>>>>> of rows.
>>>>>>
>>>>>> You could also check if users are still logged on, just before
>>>>>> gathering
>>>>>> the list of logged on users...
>>>>>> (and when someone logs in)
>>>>>>
>>>>>> This way your database will not give the correct 'state' to you,
>>>>>> but to
>>>>>> the web-users it will, because you put all the changes in there
>>>>>> before
>>>>>> you show anything to the web-users...
>>>>>>
>>>>>> --
>>>>>> Luuk
>>>>>
>>>>> Luuk,
>>>>>
>>>>> I like the idea but I don't know exactly how to check if users are
>>>>> still logged in?
>>>>>
>>>>> Marco
>>>>
>>>> i meant to logg the user off when they have not clicked for a defined
>>>> number of minutes (after 10, or 15 minutes, or so....)
>>>
>>>
>>> Any thoughts on how this would work with an<object> that points to a
>>> remote swf? The person might be running the swf for some time without
>>> causing any activity on the page that contains the<object>.
>>>
>>> Bill B
>>>
>>>
>>
>> swf has nothing to do with PHP.... ;)
>>
>> I'm not into swf-stuff.....
>
> The page in question looks like this:
> <html>
> </html?
> <body>
> <?php
> get $gamepath $game from $_SESSION variables
> ?>
> <object width type
> data=http:domain/$gamepath/$game/game.swf
> param name = some stuff
> </object>
> </body>
> </html>
>
> So, the question, as I understand it, is how to monitor this page for
> the inactivity you referred to earlier, when the user could be playing
> the swf based game and not move off the page for a while.
>
> If, for example:
>
> <?php
> while $seconds_since_last click <= $inactivity_limit;
> do nothing
> endwhile;
> logoff_user();
> ?>
>
> would not the focus on the <object> cause the inactivity limit to be
> reached [potentially] before the person is finished with the game?
>
> Unless I'm way off, seems like a PHP question to me.
>
> Bill B

As Luuk indicated, swf has nothing to do with PHP.  PHP knows nothing 
about it and doesn't interact with it.  Whether the user is watching a 
swf, gone to lunch or even just shut off his computer and went home is 
immaterial to php.

The answer is, you can't tell what the user is doing from php.  All you 
can do is tell when the user makes a request to the server.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#2231

FromBill B <me@privacy.net>
Date2011-06-17 17:07 -0400
Message-ID<itgfmj$fon$2@dont-email.me>
In reply to#2230
On 6/17/2011 4:47 PM, Jerry Stuckle wrote:
> On 6/17/2011 4:39 PM, Bill B wrote:
>> On 6/17/2011 4:06 PM, Luuk wrote:
>>> On 17-06-2011 21:13, Bill B wrote:
>>>> On 6/17/2011 2:53 PM, Luuk wrote:
>>>>> On 17-06-2011 13:25, Co wrote:
>>>>>> On 15 jun, 20:33, Luuk<L...@invalid.lan> wrote:
>>>>>>> On 15-06-2011 00:57, Jerry Stuckle wrote:
>>>>>>>> On 6/14/2011 4:22 PM, Co wrote:
>>>>>>>>> Hi All,
>>>>>>>
>>>>>>>>> I have this code that will change one field of the users record
>>>>>>>>> when
>>>>>>>>> he logs in:
>>>>>>>
>>>>>>>>> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
>>>>>>>>> WHERE id='$id' LIMIT 1");
>>>>>>>
>>>>>>>>> This way we can display all the users who are logged in on the
>>>>>>>>> main
>>>>>>>>> page.
>>>>>>>>> When the user logs of the record will be changed again:
>>>>>>>
>>>>>>>>> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT
>>>>>>>>> 1");
>>>>>>>
>>>>>>>>> However what if the user just forgets to log off, then he is
>>>>>>>>> gone but
>>>>>>>>> his status is still logged=1.
>>>>>>>>> Is there a way to make sure the user status is changed even
>>>>>>>>> when he
>>>>>>>>> forgets to log off?
>>>>>>>
>>>>>>>>> Marco
>>>>>>>
>>>>>>>> The web is stateless - there is no such concept as "logged in" or
>>>>>>>> not.
>>>>>>>> And there is no way to know if the user is still reading your page,
>>>>>>>> has
>>>>>>>> gone to coffee (or lunch), closed the browser or even shut off the
>>>>>>>> computer. So there is no way to determine how many people are
>>>>>>>> logged in
>>>>>>>> or not - and sites which claim to do that are pretty much guessing.
>>>>>>>
>>>>>>>> The best you can do is create your own custom session handler which
>>>>>>>> stores the data in a database instead of the file system. Then you
>>>>>>>> can
>>>>>>>> assume as long as the session is active, the user is logged in.
>>>>>>>> When
>>>>>>>> the session expires, the user is logged out. Still not real
>>>>>>>> accurate,
>>>>>>>> but the best you can do.
>>>>>>>
>>>>>>>> Just a warning - custom session handlers can be complex and pretty
>>>>>>>> much
>>>>>>>> beyond what you can do in a newsgroup.
>>>>>>>
>>>>>>>> Otherwise, Luuk's response is as good as any. And it will be
>>>>>>>> about as
>>>>>>>> accurate as anything. You need a cron job to handle the deletion
>>>>>>>> of rows.
>>>>>>>
>>>>>>> You could also check if users are still logged on, just before
>>>>>>> gathering
>>>>>>> the list of logged on users...
>>>>>>> (and when someone logs in)
>>>>>>>
>>>>>>> This way your database will not give the correct 'state' to you,
>>>>>>> but to
>>>>>>> the web-users it will, because you put all the changes in there
>>>>>>> before
>>>>>>> you show anything to the web-users...
>>>>>>>
>>>>>>> --
>>>>>>> Luuk
>>>>>>
>>>>>> Luuk,
>>>>>>
>>>>>> I like the idea but I don't know exactly how to check if users are
>>>>>> still logged in?
>>>>>>
>>>>>> Marco
>>>>>
>>>>> i meant to logg the user off when they have not clicked for a defined
>>>>> number of minutes (after 10, or 15 minutes, or so....)
>>>>
>>>>
>>>> Any thoughts on how this would work with an<object> that points to a
>>>> remote swf? The person might be running the swf for some time without
>>>> causing any activity on the page that contains the<object>.
>>>>
>>>> Bill B
>>>>
>>>>
>>>
>>> swf has nothing to do with PHP.... ;)
>>>
>>> I'm not into swf-stuff.....
>>
>> The page in question looks like this:
>> <html>
>> </html?
>> <body>
>> <?php
>> get $gamepath $game from $_SESSION variables
>> ?>
>> <object width type
>> data=http:domain/$gamepath/$game/game.swf
>> param name = some stuff
>> </object>
>> </body>
>> </html>
>>
>> So, the question, as I understand it, is how to monitor this page for
>> the inactivity you referred to earlier, when the user could be playing
>> the swf based game and not move off the page for a while.
>>
>> If, for example:
>>
>> <?php
>> while $seconds_since_last click <= $inactivity_limit;
>> do nothing
>> endwhile;
>> logoff_user();
>> ?>
>>
>> would not the focus on the <object> cause the inactivity limit to be
>> reached [potentially] before the person is finished with the game?
>>
>> Unless I'm way off, seems like a PHP question to me.
>>
>> Bill B
>
> As Luuk indicated, swf has nothing to do with PHP. PHP knows nothing
> about it and doesn't interact with it. Whether the user is watching a
> swf, gone to lunch or even just shut off his computer and went home is
> immaterial to php.
>
> The answer is, you can't tell what the user is doing from php. All you
> can do is tell when the user makes a request to the server.

Jerry, I took Luuk's original suggestion (from above, "i meant to logg 
the user off when they have not clicked for a defined number of minutes 
(after 10, or 15 minutes, or so....)) to mean that some PHP routine 
would check how long it has been since activity, then log the user out. 
If I have missed the mark on that one, I agree with you, the 
conversation is over.

If not, then is this not a question of focus? If <object> has included 
the swf, where is the focus? On the page (containing the PHP code) or on 
the swf? If it is on the swf, then conversation over. But if there is 
still focus on the page with the PHP code, would it not be possible to 
have PHP code that does what Luuk referred to?

Bill B


Bill B

[toc] | [prev] | [next] | [standalone]


#2233

FromTim Streater <timstreater@waitrose.com>
Date2011-06-17 22:47 +0100
Message-ID<timstreater-3D9661.22472017062011@news.individual.net>
In reply to#2231
In article <itgfmj$fon$2@dont-email.me>, Bill B <me@privacy.net> wrote:

> On 6/17/2011 4:47 PM, Jerry Stuckle wrote:
> > On 6/17/2011 4:39 PM, Bill B wrote:
> >> On 6/17/2011 4:06 PM, Luuk wrote:
> >>> On 17-06-2011 21:13, Bill B wrote:
> >>>> On 6/17/2011 2:53 PM, Luuk wrote:
> >>>>> On 17-06-2011 13:25, Co wrote:
> >>>>>> On 15 jun, 20:33, Luuk<L...@invalid.lan> wrote:
> >>>>>>> On 15-06-2011 00:57, Jerry Stuckle wrote:
> >>>>>>>> On 6/14/2011 4:22 PM, Co wrote:

[massive snip]

> Jerry, I took Luuk's original suggestion (from above, "i meant to logg 
> the user off when they have not clicked for a defined number of minutes 
> (after 10, or 15 minutes, or so....)) to mean that some PHP routine 
> would check how long it has been since activity, then log the user out. 
> If I have missed the mark on that one, I agree with you, the 
> conversation is over.

I haven't followed this in detail, but I could imagine a timer in some 
JavaScript that you write for the browser page will after some time 
cause you to send a request to the server to log the guy off.

> If not, then is this not a question of focus? If <object> has included 
> the swf, where is the focus? On the page (containing the PHP code) or on 
> the swf? If it is on the swf, then conversation over. But if there is 
> still focus on the page with the PHP code, would it not be possible to 
> have PHP code that does what Luuk referred to?

There is no PHP code in your page in the browser. That will have been 
executed before the page reaches the user's browser. So, if you're 
driving it from client-side i'll have to be JS.

-- 
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

[toc] | [prev] | [next] | [standalone]


#2236

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-06-17 20:25 -0400
Message-ID<itgra5$ooh$3@dont-email.me>
In reply to#2231
On 6/17/2011 5:07 PM, Bill B wrote:
> On 6/17/2011 4:47 PM, Jerry Stuckle wrote:
>> On 6/17/2011 4:39 PM, Bill B wrote:
>>> On 6/17/2011 4:06 PM, Luuk wrote:
>>>> On 17-06-2011 21:13, Bill B wrote:
>>>>> On 6/17/2011 2:53 PM, Luuk wrote:
>>>>>> On 17-06-2011 13:25, Co wrote:
>>>>>>> On 15 jun, 20:33, Luuk<L...@invalid.lan> wrote:
>>>>>>>> On 15-06-2011 00:57, Jerry Stuckle wrote:
>>>>>>>>> On 6/14/2011 4:22 PM, Co wrote:
>>>>>>>>>> Hi All,
>>>>>>>>
>>>>>>>>>> I have this code that will change one field of the users record
>>>>>>>>>> when
>>>>>>>>>> he logs in:
>>>>>>>>
>>>>>>>>>> mysql_query("UPDATE myMembers SET last_log_date=now(), logged='1'
>>>>>>>>>> WHERE id='$id' LIMIT 1");
>>>>>>>>
>>>>>>>>>> This way we can display all the users who are logged in on the
>>>>>>>>>> main
>>>>>>>>>> page.
>>>>>>>>>> When the user logs of the record will be changed again:
>>>>>>>>
>>>>>>>>>> mysql_query("UPDATE myMembers SET logged='0' WHERE id='$id' LIMIT
>>>>>>>>>> 1");
>>>>>>>>
>>>>>>>>>> However what if the user just forgets to log off, then he is
>>>>>>>>>> gone but
>>>>>>>>>> his status is still logged=1.
>>>>>>>>>> Is there a way to make sure the user status is changed even
>>>>>>>>>> when he
>>>>>>>>>> forgets to log off?
>>>>>>>>
>>>>>>>>>> Marco
>>>>>>>>
>>>>>>>>> The web is stateless - there is no such concept as "logged in" or
>>>>>>>>> not.
>>>>>>>>> And there is no way to know if the user is still reading your
>>>>>>>>> page,
>>>>>>>>> has
>>>>>>>>> gone to coffee (or lunch), closed the browser or even shut off the
>>>>>>>>> computer. So there is no way to determine how many people are
>>>>>>>>> logged in
>>>>>>>>> or not - and sites which claim to do that are pretty much
>>>>>>>>> guessing.
>>>>>>>>
>>>>>>>>> The best you can do is create your own custom session handler
>>>>>>>>> which
>>>>>>>>> stores the data in a database instead of the file system. Then you
>>>>>>>>> can
>>>>>>>>> assume as long as the session is active, the user is logged in.
>>>>>>>>> When
>>>>>>>>> the session expires, the user is logged out. Still not real
>>>>>>>>> accurate,
>>>>>>>>> but the best you can do.
>>>>>>>>
>>>>>>>>> Just a warning - custom session handlers can be complex and pretty
>>>>>>>>> much
>>>>>>>>> beyond what you can do in a newsgroup.
>>>>>>>>
>>>>>>>>> Otherwise, Luuk's response is as good as any. And it will be
>>>>>>>>> about as
>>>>>>>>> accurate as anything. You need a cron job to handle the deletion
>>>>>>>>> of rows.
>>>>>>>>
>>>>>>>> You could also check if users are still logged on, just before
>>>>>>>> gathering
>>>>>>>> the list of logged on users...
>>>>>>>> (and when someone logs in)
>>>>>>>>
>>>>>>>> This way your database will not give the correct 'state' to you,
>>>>>>>> but to
>>>>>>>> the web-users it will, because you put all the changes in there
>>>>>>>> before
>>>>>>>> you show anything to the web-users...
>>>>>>>>
>>>>>>>> --
>>>>>>>> Luuk
>>>>>>>
>>>>>>> Luuk,
>>>>>>>
>>>>>>> I like the idea but I don't know exactly how to check if users are
>>>>>>> still logged in?
>>>>>>>
>>>>>>> Marco
>>>>>>
>>>>>> i meant to logg the user off when they have not clicked for a defined
>>>>>> number of minutes (after 10, or 15 minutes, or so....)
>>>>>
>>>>>
>>>>> Any thoughts on how this would work with an<object> that points to a
>>>>> remote swf? The person might be running the swf for some time without
>>>>> causing any activity on the page that contains the<object>.
>>>>>
>>>>> Bill B
>>>>>
>>>>>
>>>>
>>>> swf has nothing to do with PHP.... ;)
>>>>
>>>> I'm not into swf-stuff.....
>>>
>>> The page in question looks like this:
>>> <html>
>>> </html?
>>> <body>
>>> <?php
>>> get $gamepath $game from $_SESSION variables
>>> ?>
>>> <object width type
>>> data=http:domain/$gamepath/$game/game.swf
>>> param name = some stuff
>>> </object>
>>> </body>
>>> </html>
>>>
>>> So, the question, as I understand it, is how to monitor this page for
>>> the inactivity you referred to earlier, when the user could be playing
>>> the swf based game and not move off the page for a while.
>>>
>>> If, for example:
>>>
>>> <?php
>>> while $seconds_since_last click <= $inactivity_limit;
>>> do nothing
>>> endwhile;
>>> logoff_user();
>>> ?>
>>>
>>> would not the focus on the <object> cause the inactivity limit to be
>>> reached [potentially] before the person is finished with the game?
>>>
>>> Unless I'm way off, seems like a PHP question to me.
>>>
>>> Bill B
>>
>> As Luuk indicated, swf has nothing to do with PHP. PHP knows nothing
>> about it and doesn't interact with it. Whether the user is watching a
>> swf, gone to lunch or even just shut off his computer and went home is
>> immaterial to php.
>>
>> The answer is, you can't tell what the user is doing from php. All you
>> can do is tell when the user makes a request to the server.
>
> Jerry, I took Luuk's original suggestion (from above, "i meant to logg
> the user off when they have not clicked for a defined number of minutes
> (after 10, or 15 minutes, or so....)) to mean that some PHP routine
> would check how long it has been since activity, then log the user out.
> If I have missed the mark on that one, I agree with you, the
> conversation is over.
>
> If not, then is this not a question of focus? If <object> has included
> the swf, where is the focus? On the page (containing the PHP code) or on
> the swf? If it is on the swf, then conversation over. But if there is
> still focus on the page with the PHP code, would it not be possible to
> have PHP code that does what Luuk referred to?
>
> Bill B
>
>
> Bill B

As I said.  PHP knows nothing about the swf file.  It may be on a page 
with PHP code, but the PHP code is executed on the server and the 
resultant output is sent to the browser.  The swf file is processed on 
the browser, after the PHP script has ended.

PHP does not execute in the browser, so there is no way for PHP to 
determine what is going on at the browser level.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#2240

FromBill B <me@privacy.net>
Date2011-06-18 00:15 -0400
Message-ID<ith8nq$vbl$1@dont-email.me>
In reply to#2236
On 6/17/2011 8:25 PM, Jerry Stuckle wrote:
> As I said. PHP knows nothing about the swf file. It may be on a page
> with PHP code, but the PHP code is executed on the server and the
> resultant output is sent to the browser. The swf file is processed on
> the browser, after the PHP script has ended.
>
> PHP does not execute in the browser, so there is no way for PHP to
> determine what is going on at the browser level.

That is a useful distinction. You repeat this often, and now that I have 
a context to put it in, it makes more sense. Thank you.

Bill B

[toc] | [prev] | [next] | [standalone]


#2246

FromLuuk <Luuk@invalid.lan>
Date2011-06-18 13:37 +0200
Message-ID<4dfc8de8$0$49179$e4fe514c@news.xs4all.nl>
In reply to#2240
On 18-06-2011 06:15, Bill B wrote:
> On 6/17/2011 8:25 PM, Jerry Stuckle wrote:
>> As I said. PHP knows nothing about the swf file. It may be on a page
>> with PHP code, but the PHP code is executed on the server and the
>> resultant output is sent to the browser. The swf file is processed on
>> the browser, after the PHP script has ended.
>>
>> PHP does not execute in the browser, so there is no way for PHP to
>> determine what is going on at the browser level.
> 
> That is a useful distinction. You repeat this often, and now that I have
> a context to put it in, it makes more sense. Thank you.
> 
> Bill B
> 

But, to get back to that game,

If he want to keep on looking at another part of your site,

If he requests another page form your site, than the PHP code (as
suggested) will log him off when he was 'away' for more than 10 minutes.

If someone else clicked your site more than 10 minutes after he started
playing, than he is already logged... ;)

-- 
Luuk

[toc] | [prev] | [next] | [standalone]


#2248

FromBill B <me@privacy.net>
Date2011-06-18 11:46 -0400
Message-ID<itih7d$ce2$1@dont-email.me>
In reply to#2246
On 6/18/2011 7:37 AM, Luuk wrote:
> On 18-06-2011 06:15, Bill B wrote:
>> On 6/17/2011 8:25 PM, Jerry Stuckle wrote:
>>> As I said. PHP knows nothing about the swf file. It may be on a page
>>> with PHP code, but the PHP code is executed on the server and the
>>> resultant output is sent to the browser. The swf file is processed on
>>> the browser, after the PHP script has ended.
>>>
>>> PHP does not execute in the browser, so there is no way for PHP to
>>> determine what is going on at the browser level.
>>
>> That is a useful distinction. You repeat this often, and now that I have
>> a context to put it in, it makes more sense. Thank you.
>>
>> Bill B
>>
>
> But, to get back to that game,
>
> If he want to keep on looking at another part of your site,
>
> If he requests another page form your site, than the PHP code (as
> suggested) will log him off when he was 'away' for more than 10 minutes.
>
> If someone else clicked your site more than 10 minutes after he started
> playing, than he is already logged... ;)

OK, will put some thinking into that. Thank you,

Bill B

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web