Helo there. Thankyou for reading. actually i already searching about this and i cant find one match my problem! So i have a website and i want to use login system so only people that their account in my database that can access my content. But there a problem in my content. I use flip builder for make my pdf file looks interactive like real book.
and i already put php code in there so when the page open they will check login token in my database. But there is a way to bypass this security i made. The user can open my website and open the book link and after the authentication code run. Then in other device, the same user can login and open my content. So my content can be read in two device at the same time until the first device do refresh. I already think about adding auto refresh but it will make the user uncomfortable because the reading progress will restart from beginning. So can u all help me guys? I want the php code for the content run without refresh the page
this is the code i want to add in every content
<?php
include($_SERVER['DOCUMENT_ROOT']."/login/config.php");
include($_SERVER['DOCUMENT_ROOT']."/login/check_token.php");
// Check user login or not
if(!isset($_SESSION['username'])){
header('Location: https://futuresystem-online.com/login/');
}
?>
<html>
<head><title>content</title></head>
<body>
<p> this is my content</p>
</body>
</html>
how do i make the code run every 1 minute?
Thankyou all for helping