In my system, I have specific pages for each user individually. These pages are public but with a custom URL, and not meant to be shared, so each user has its own URL, i.e: https://website.com/userID-456/name-surname
I need to prevent more than one concurrent user on the page. If someone is on the page, and someone access the same page URL somewhere else, a popup must show something like "Your link was accessed on other device and this page will close" and redirect to some other URL.
My question is, how to work on this situation to constantly verify if the page was reached on some other device, browser, place?
I've seached for some solutions but nothing useful for my scenario. The system is in PHP, I can use JS, Jquery, etc. I also work with Apache and MariaDB.
Any help or idea is welcome!
Edit: it doesn't need to check in real time, I can have some delay like some cronjob. Like every 1 or 2 minutes.
Via Active questions tagged javascript - Stack Overflow https://ift.tt/tAEVqy4
Comments
Post a Comment