Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //function timer login
- function timer()
- {
- $timeout = 30; // dalam satuan detik
- $_SESSION['timeout'] = $timeout;
- }
- function cek_login() {
- if (isset($_SESSION['timeout']))
- {
- $exp_time = $_SESSION['timeout'];
- if (time() < $exp_time) {
- timer();
- return true;
- } else {
- return false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement