tce_functions_session.php
Tags
Table of Contents
Functions
- F_session_open() : bool
- Open session.
- F_session_close() : bool
- Close session.<br> Call garbage collector function to remove expired sessions.
- F_session_read() : string
- Get session data.
- F_session_write() : resource
- Insert or Update session.
- F_session_destroy() : resource
- Deletes the specific session.
- F_session_gc() : int
- Garbage collector.<br> Deletes expired sessions.<br> NOTE: while time() function returns a 32 bit integer, it works fine until year 2038.
- F_session_string_to_array() : array<string|int, mixed>
- Convert encoded session string data to array.
- getClientFingerprint() : string
- Generate a client fingerprint (unique ID for the client browser)
- getNewSessionID() : string
- Generate and return a new session ID.
- getPasswordHash() : string
- Hash password for Database storing.
- checkPassword() : bool
- Verifies that a password matches a hash
- getPlainCSRFToken() : string
- Generate unencoded CSRF token string
- checkCSRFToken() : bool
- Check the CSRF token
- F_getCSRFToken() : string
- Generate CSRF token
Functions
F_session_open()
Open session.
F_session_open( $save_path,
$session_name)
: bool
Parameters
Return values
bool —always TRUE
F_session_close()
Close session.<br> Call garbage collector function to remove expired sessions.
F_session_close()
: bool
Return values
bool —always TRUE
F_session_read()
Get session data.
F_session_read( $key)
: string
Parameters
Return values
string —session data.
F_session_write()
Insert or Update session.
F_session_write( $key,
$val)
: resource
Parameters
Return values
resource —database query result.
F_session_destroy()
Deletes the specific session.
F_session_destroy( $key)
: resource
Parameters
Return values
resource —database query result.
F_session_gc()
Garbage collector.<br> Deletes expired sessions.<br> NOTE: while time() function returns a 32 bit integer, it works fine until year 2038.
F_session_gc()
: int
Return values
int —number of deleted sessions.
F_session_string_to_array()
Convert encoded session string data to array.
F_session_string_to_array( $sd)
: array<string|int,
mixed>
Parameters
Tags
Return values
array<string|int, mixed>getClientFingerprint()
Generate a client fingerprint (unique ID for the client browser)
getClientFingerprint()
: string
Tags
Return values
string —client ID
getNewSessionID()
Generate and return a new session ID.
getNewSessionID()
: string
Tags
Return values
string —PHPSESSID
getPasswordHash()
Hash password for Database storing.
getPasswordHash( $password)
: string
Parameters
Return values
string —password hash
checkPassword()
Verifies that a password matches a hash
checkPassword( $password,
$hash)
: bool
Parameters
Return values
boolgetPlainCSRFToken()
Generate unencoded CSRF token string
getPlainCSRFToken()
: string
Return values
stringcheckCSRFToken()
Check the CSRF token
checkCSRFToken( $token)
: bool
Parameters
Return values
boolF_getCSRFToken()
Generate CSRF token
F_getCSRFToken()
: string