V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
fuwu1245
V2EX  ›  问与答

PHP 如何限制用户同时只能有只能有一台设备在线?

  •  
  •   fuwu1245 · Feb 23, 2017 · 2370 views
    This topic created in 3355 days ago, the information mentioned may be changed or developed.
    改造公司一个现有的项目,用了 CodeIgniter 框架,现在的需求是限制用户在同一时间只能有一台设备在线
    sessionid 存储在 redis 里面
    客户端 cookies 里亦存储了 sessionid
    2 replies    2017-02-23 21:22:34 +08:00
    1Satoshi
        1
    1Satoshi  
       Feb 23, 2017
    多存一个 token ,每次登录更新 token 的值。
    lslqtz
        2
    lslqtz  
       Feb 23, 2017 via iPhone
    用 ua
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2362 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 01:45 · PVG 09:45 · LAX 18:45 · JFK 21:45
    ♥ Do have faith in what you're doing.