Topic awaiting preservation: Indicate if I am on line (Page 1 of 1) |
|
---|---|
Neurotic (0) Inmate Newly admitted From: |
posted 10-13-2006 03:56
Hello - newbe here |
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 10-13-2006 09:23
Well, yes and no... |
Obsessive-Compulsive (I) Inmate From: |
posted 10-13-2006 22:08
Thanks for the reply. |
Lunatic (VI) Mad Scientist From: Happy Hunting Grounds... |
posted 10-13-2006 22:38
quote:
|
Obsessive-Compulsive (I) Inmate From: |
posted 10-14-2006 00:55
quote:
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 10-14-2006 09:16
You still need to visit a page on your website regularly, to tell the server you're online. |
Lunatic (VI) Mad Scientist From: Happy Hunting Grounds... |
posted 10-14-2006 13:24
TP, he is asking quote:
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 10-14-2006 14:42
And my point is that it's a whole lot easier to build this from skratch then to try to rip it out of an existing forum software. code: $fh = fopen ( "lastseenwebmaster.dat",'wb'); if ( $fh ) { fwrite($fh, time()); fclose($fh); print "I know now my user is online."; } else print "Could not store your presence :(";
code: $bUserIsOn = false; $minutesToAppearOnline = 5; $fh = fopen ( "lastseenwebmaster.dat",'rb'); if ( $fh ) { $timeLastSeen = fread($fh, 1024); fclose($fh); $timeLastSeen = intval ( $timeLastSeen); if ( $timeLastSeen != 0 && $timeLastSeen + $minutesToAppearOnline * 60 <= time() ) $bUserIsOn = true; } if ( $bUserIsOn ) { print "The user is online"; }
|
Lunatic (VI) Mad Scientist From: Happy Hunting Grounds... |
posted 10-14-2006 23:35
*sigh* quote:
|
Obsessive-Compulsive (I) Inmate From: |
posted 10-16-2006 01:02
Thanks everyone, I think I sorta understand. I'll play with it a bit and see what I can come up with. |
Lunatic (VI) Inmate From: under the bed |
posted 10-16-2006 18:09
Ws - the point is that, well....it is pretty much necessary to do that kind of thing. Yes, forum's do it all the time. But there obviously msut be a method by which they achieve this. |
Lunatic (VI) Mad Scientist From: Happy Hunting Grounds... |
posted 10-16-2006 22:13
Yes, I do understand that DL. I just was a bit puzzled by the initial reply that TP posted. |