Advertisement
TechGeek

check.php

Sep 16th, 2020 (edited)
934
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2.  
  3. declare(strict_types=1);
  4.  
  5. // Start session.
  6. session_start();
  7.  
  8. // Include helper functions.
  9. require_once 'helpers.php';
  10.  
  11. if (! check_auth()) {
  12.     logout();
  13.  
  14.     echo json_encode([
  15.         'auth'     => false,
  16.         'redirect' => 'login.php',
  17.     ]);
  18.  
  19.     return;
  20. }
  21.  
  22. echo json_encode([
  23.     'auth' => true,
  24. ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement