简体   繁体   English

关闭所有已登录用户的控制台后,将其重置

[英]reset all logged in users after they shutdown their consoled

i have list of student who have Nintendo DSs, and they should log in my website to solve some sheets (by using DS Opera browser), when they logged in , (status filed at my DB will change from 0 to 1),also the status change to 0 if they log out, what i need is when the student didn't log out and Shut down their DS's , the status should be 0,, i don't have an idea to it, any suggestion would be helpful for me .. 我有拥有Nintendo DS的学生列表,他们应该登录我的网站来解决一些工作表(使用DS Opera浏览器),当他们登录时(在我的数据库中提交的状态将从0更改为1),并且如果他们注销,状态会更改为0,我需要的是当学生未注销并关闭其DS时,状态应为0,我对此一无所知,任何建议都将对您有所帮助我 ..

FYI ,DS opera browser limitation here 仅供参考,DS歌剧浏览器的限制在这里

Due to the stateless nature of the web, there is no way to get notified what a user shuts down her browser. 由于网络的无状态性质,无法获得有关用户关闭其浏览器的通知。

The usual solution to this problem is to have some kind of an "I'm still connected" notification using ajax calls, and a timeout on the server side when a user hasn't checked in after a while. 解决此问题的常用方法是使用ajax调用发出某种“我仍处于连接状态”通知,并在一段时间后用户未签入时在服务器端发生超时。

As far as I can tell, there should be a problem doing that on the DS opera browser. 据我所知,在DS Opera浏览器上执行此操作应该有问题。

While itsadok is correct, you could tell who connected recently by using sessions for all your pages. 尽管itsadok是正确的,但您可以通过对所有页面使用会话来告诉谁最近连接。 Life would be a lot simpler if you implement your own session handler using a database for storage - and keep (a copy of) the authenticated username in a separate field from the session data. 如果您使用数据库进行存储来实现自己的会话处理程序,那么将使生活简单得多-将经过身份验证的用户名(的副本)与会话数据保存在单独的字段中。

C. C。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM