Home >Backend Development >PHP Tutorial >How to determine in PHP that the current user has logged in elsewhere and the current user is elsewhere_PHP Tutorial

How to determine in PHP that the current user has logged in elsewhere and the current user is elsewhere_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 10:10:11982browse

How does PHP determine that the current user has logged in elsewhere and the current user is elsewhere

Source: http://bbs.lampbrother.net/read-htm-tid-121909-ds -1.html#tpc

Main ideas:
1. When logging in, record the user’s SessionID
2. When verifying login, match the recorded user’s SessionID with the current SessionID
3. If they are not the same, explain in Log in elsewhere
Please see the demo code for details, there are comments inside.








www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/938096.htmlTechArticlePHP How to determine that the current user has logged in elsewhere and the current user is elsewhere Source: http://bbs.lampbrother. net/read-htm-tid-121909-ds-1.html#tpc Main ideas: 1. When logging in, change the user's...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn