What's new

Help PHP Online and Offline Status

EEEEERRRRRAAAA

Honorary Poster
Joined
Oct 28, 2018
Posts
442
Reaction
48
Points
248
Age
25
1650356556519.png

1650356627463.png

1650356702476.png

Pa help po ako mga Paps sa Status ng users if online and online gusto ko sana pag login niya ma track ko yung users if online kung na logout naman siya naka display naman po siya offline.. help mga paps
 

Attachments

hind ako masyado marunong sa php e pero pwede mo gawin dyan yung ma update ang status ni user to online kapag success ang login nya then kapag nag logout update lang din to offline ang status ni user. Ganan ginawa ko sa system ko ngayon e. eto dagdag feature pa, kapag offline ang status ni user di sya pwede mag edit or mag access sa users dashboard(if meron) sa laravel kase mas madali ma track yung ganito e pero ang alam ko ginagamitan lang yan ng session haha.
 
hind ako masyado marunong sa php e pero pwede mo gawin dyan yung ma update ang status ni user to online kapag success ang login nya then kapag nag logout update lang din to offline ang status ni user. Ganan ginawa ko sa system ko ngayon e. eto dagdag feature pa, kapag offline ang status ni user di sya pwede mag edit or mag access sa users dashboard(if meron) sa laravel kase mas madali ma track yung ganito e pero ang alam ko ginagamitan lang yan ng session haha.
so what if hindi nag logout ? pero inactive na pala yung user. so sa tuwing nag iinvoke lang ba sa logout button na dedetermine yung state ng user ? And regarding sa laravel na madali ma track I think walang ganon , it all applies to different framework. Laravel itself can't handle that kind of feature by default.
 
so what if hindi nag logout ? pero inactive na pala yung user. so sa tuwing nag iinvoke lang ba sa logout button na dedetermine yung state ng user ? And regarding sa laravel na madali ma track I think walang ganon , it all applies to different framework. Laravel itself can't handle that kind of feature by default.
Ang ibig ko lang sabihin sa madali ma track is yung pag check ng status ng user, if status ni user ay offline then nag try sya mag edit or mag punta sa ibang page ay ma redirect sya sa login page.

so what if hindi nag logout ? pero inactive na pala yung user. so sa tuwing nag iinvoke lang ba sa logout button na dedetermine yung state ng user ? And regarding sa laravel na madali ma track I think walang ganon , it all applies to different framework. Laravel itself can't handle that kind of feature by default.
About naman sa what if hind nag logout si user yun lang hind ko alam HAHAHA. Baka may suggestion ka about dyan lods😆
 
Last edited:
pwede kayo mag cronjob to check the status of all users. pero if maramihan na users medyo matatagalan na yan.
 
Dont over complicate. Query mo lang ung user/users na may 'status = online' kung gusto mo itrack mga online user/users; then sa logout function mo query update mo yung user to 'status = offline' once na nag logout. Simple database query lang yan.
 

Similar threads

Back
Top