简体   繁体   中英

Best way to list online users with PHP but without MySQL?

I want to make a script that will list online users when they enter a page. Simple way is record newly entered users into MySQL and list them for example every second. But I don't think it's a good idea with tons of users like in a facebook app come in and out of the page. There would be a way with Flash and PHP sockets but I really don't want to use Flash either. So is there any option left?

也许您可以使用Memcache来存储用户信息(例如会话)以进行大量的频繁查询。我认为这是一种简单有效的工作方式。

Assuming you are using a login sistem so you have all the info you need stored somewhere in your database!

you can use sessions!

here there is also a solution on stackoverflow

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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