SHARE
TWEET

Untitled

a guest Jan 20th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ini_set('session.gc_maxlifetime', 18000);
  2.    
  3. var refreshSn = function ()
  4. {
  5.     var time = 600000; // 10 mins
  6.     settimeout(
  7.         function ()
  8.         {
  9.         $.ajax({
  10.            url: 'refresh_session.php',
  11.            cache: false,
  12.            complete: function () {refreshSn();}
  13.         });
  14.     },
  15.     time
  16. );
  17. };
  18.    
  19. <?php
  20. session_start();
  21.  
  22. // store session data
  23. if (isset($_SESSION['id']))
  24. $_SESSION['id'] = $_SESSION['id']; // or if you have any algo.
  25. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top