PHP:如何设置“最近访问”算得更好

发布于 2024-09-18 10:36:52 字数 271 浏览 5 评论 0原文

当用户登录时,我的主页上有“您最近的 5 次访问”。它工作得很好,没有任何问题。

但后来我想改变它。我不知道应该如何做到这一点,但不知何故,一次只计算用户 1 次,而不是例如,如果他访问/刷新您的个人资料,则计算 10 次。

那么我应该用时间检查器来做到这一点吗?它应该在多长时间内只计数 1?秒数应该在什么时候计算?我需要一些想法,因为我不知道我是否应该让它每 10 分钟计数 1 次或每 1 分钟计数 1 次。

所以一个好的解决方案/给出一个好的现实的分钟提示将回答这个问题。

I have "Your latest 5 visits" at the home page of the user when he logs on. It works great without any problem.

But then i want to change it. I dont know how i should do this, but someway somehow only count the user 1 time at the time, and not e.g 10 times if he visits/refresh your profile.

So should i do this with a time checker? And for how long should it only count 1? When should second count? I need some idea for this, as I dont know if i should make it count 1 time per 10 minutes or 1 time per 1 minute..

So a good solution/giving a good realistic minute tip will answer the question.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

就此别过 2024-09-25 10:36:52

有许多关于“您的上次访问”的教程

http://www.tizag.com/ phpT/phpcookies.php

There are a number of tutorials about 'Your Last Visit'

http://www.tizag.com/phpT/phpcookies.php

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文