Jump to content
Sign in to follow this  
ntec

Sett session tid

Recommended Posts

Hvordan setter jeg sessions levetid?

5288046[/snapback]

 

Lagre gjeldende tid som en session variabel, sjekk så hvor lang tid det har gått siden denne tiden og nullstill status for brukeren etter denne tiden (vis innloggingssiden f.eks).

 

$_SESSION['sessionstart'] = array_sum(explode(" ",microtime()));

if (round((array_sum(explode(" ",microtime())) - $startTime)) > 20) {
 echo "20 sekunder har gått. Logg in på nytt.";
}

 

Fant også noe her:

http://no.php.net/manual/en/function.sessi...ache-expire.php

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...