Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ini_set('session.gc_maxlifetime', 18000);
- var refreshSn = function ()
- {
- var time = 600000; // 10 mins
- settimeout(
- function ()
- {
- $.ajax({
- url: 'refresh_session.php',
- cache: false,
- complete: function () {refreshSn();}
- });
- },
- time
- );
- };
- <?php
- session_start();
- // store session data
- if (isset($_SESSION['id']))
- $_SESSION['id'] = $_SESSION['id']; // or if you have any algo.
- ?>
Add Comment
Please, Sign In to add comment