i am using the follow codes to add and end a session:
add
$session = new CGI::Session("driver:File",undef,{'Directory'=>"$path_session"});
$session->param('painel_usuario',"$id $name");
$session->param('_IDLE_EXPIRY' => time + 1800);
$session->expire('+1d');
$sid = $session->id();
ends
$session = new CGI::Session("driver:File",$scookie,{'Directory'=>"$path_session"}) or die "$!";
$session->clear(["~logged-in"]);
$session->clear(["_IDLE_EXPIRY"]);
$session->clear();
$session->expire('+1m');
$session->delete();
how could i delete the expireds ones using the module: CGI::Session::ExpireSessions;
i read the documents but i didnt got the idea of how it works
add
Code:
$path_session = '/home/domain/sessions/'; $session = new CGI::Session("driver:File",undef,{'Directory'=>"$path_session"});
$session->param('painel_usuario',"$id $name");
$session->param('_IDLE_EXPIRY' => time + 1800);
$session->expire('+1d');
$sid = $session->id();
ends
Code:
CGI::Session->name($scookie); $session = new CGI::Session("driver:File",$scookie,{'Directory'=>"$path_session"}) or die "$!";
$session->clear(["~logged-in"]);
$session->clear(["_IDLE_EXPIRY"]);
$session->clear();
$session->expire('+1m');
$session->delete();
how could i delete the expireds ones using the module: CGI::Session::ExpireSessions;
i read the documents but i didnt got the idea of how it works