setting session timeout

    Date: 01/13/09 (PHP Community)    Keywords: no keywords

    Hey guys,
    I'm undertaking a mammoth task in relation to my skill set, so my apologies if i end up posting on here a lot from now on ;)

    I am just playing about with sessions for logging in to my new site, and wanted to cover any cases of a user not logging off yet leaving the site. Currently I just have a session_start() at the top of each page, and if I leave the site, then come back to it, it keeps me logged in. But how long will that last for?

    If i use:
    session_set_cookie_params(1200);

    Would that keep a user logged in for 20 minutes regardless of whether they were active, or will it go from when they leave the site, or stop navigating? I'm really not sure of how this side of the session works :/ Ideally i'd want the session to time out after 20mins of leaving the site.

    cheers!

    paul.

    Source: http://community.livejournal.com/php/653225.html

« php driven image gallery -... || Working with multi arrays »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home