## /shared/code/tce_functions_session.php

Description

User-level session storage functions.
This script uses the session_set_save_handler() function to set the user-level session storage functions which are used for storing and retrieving data associated with a session.
The session data is stored on a local database.

NOTE: This script automatically starts the user's session.

- since: 2001-09-26
- link: www.tecnick.com
- copyright: Copyright &copy; 2004-2006, Tecnick.com S.r.l. - Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
- author: Nicola Asuni

Functions
F_session_close (line 60)

Close session.
Call garbage collector function to remove expired sessions.

- return: always TRUE

bool F_session_close ()
F_session_destroy (line 113)

Deletes the specific session.

- return: database query result.

resource F_session_destroy (string $key)

- string $key: session ID of session to destroy.

F_session_gc (line 126)

Garbage collector.
Deletes expired sessions.
NOTE: while time() function returns a 32 bit integer, it works fine until year 2038.

- return: number of deleted sessions.

int F_session_gc ([int $maxlife = K_SESSION_LIFE])

- int $maxlife: max session life time in seconds. The default value is defined by K_SESSION_LIFE costant on shared/config/tce_config.php file.

F_session_open (line 51)

Open session.

- return: always TRUE

bool F_session_open (string $save_path, string $session_name)

- string $save_path: path were to store session data
- string $session_name: name of session

F_session_read (line 70)

Get session data.

- return: session data.

string F_session_read (string $key)

- string $key: session ID.

F_session_string_to_array (line 145)

Convert encoded session string data to array.

- since: 2001-10-18
- link: www.tecnick.com
- copyright: Copyright &copy; 2004-2006, Tecnick.com S.r.l. - Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
- author: Nicola Asuni

array F_session_string_to_array (string $sd)

- string $sd: input data string

F_session_write (line 88)

Insert or Update session.

- return: database query result.

resource F_session_write (string $key, string $val)

- string $key: session ID.
- string $val: session data.

Documentation generated on Fri, 24 Nov 2006 21:16:23 +0100 by phpDocumentor 1.3.0RC3