如何防止用户一次使用多个浏览器 [英] how to prevent user from using multiple browsers at a time
问题描述
我的网站上有登录系统,用户必须为使用我的网站付费.由于他们必须付费,因此恐怕一个用户可能会与另一个用户共享其用户名和密码.因此,我必须将登录系统设置为没有用户一次只能使用一个以上的浏览器.但是他们可以不时更改浏览器(不是同时,而是一天中的不同时间段).我如何通过php来实现呢?有什么主意吗?
I have login system in my site and users have to pay for using my site. As they have to pay, I am afraid that one user may share his username and password with another users. So I have to set my login system in such way that no user can use more than one browser at a time. But they can change the browser from time to time (not at the same time but different periods of a day). How can I implement that by php? Any idea?
推荐答案
使用帮助程序javascript预加载器来收集非个人浏览器信息,并根据登录时间/帐户/IP/浏览器信息生成哈希.
Use helper javascript preloader to collect non-personal browser information and generate a hash from login time/account/IP/browser info.
在服务器端检查一次,每个用户帐户激活的哈希不超过一个,如果发生,则强制注销以前的哈希.使用另一个客户端JavaScript定期对服务器执行ping操作并检查哈希唯一性,并为动态IP"用例无缝地重新登录合法用户.
Check on server side that no more than one hashes are active per user account at a time and force logout on former ones if that happens. Use another client-side javascript to periodically ping server and check hash uniqueness and seamlessly re-login legitimate users for "dynamic IP" use case.
因此,如果用户与另一个用户共享他的帐户,他们将不断在站点外互相踢",直到惹恼足以支付第二个帐户的费用为止.
Thus if user shares his account with another user they will keep constantly "kicking" each other out of site until annoyed enough to pay for second account.
这篇关于如何防止用户一次使用多个浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!