tce__functions__session_8php

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.
tce_functions_session.php File Reference

Namespaces

 com\tecnick\tcexam\shared
 TCExam Shared Area.
 

Functions

 F_session_open ($save_path, $session_name)
 
 F_session_close ()
 
 F_session_read ($key)
 
 F_session_write ($key, $val)
 
 F_session_destroy ($key)
 
 F_session_gc ()
 
 F_session_string_to_array ($sd)
 
 getClientFingerprint ()
 
 getNewSessionID ()
 
 getPasswordHash ($password)
 

Variables

if(isset($_COOKIE[‘PHPSESSID’])) if(isset($_REQUEST[‘PHPSESSID’])) else
 

Detailed 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.

Function Documentation

F_session_close ( )

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

Returns
bool always TRUE

F_session_destroy (   $key)

Deletes the specific session.

Parameters
$key(string) session ID of session to destroy.
Returns
resource database query result.

F_session_gc ( )

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

Returns
int number of deleted sessions.

F_session_open (   $save_path,
  $session_name 
)

Open session.

Parameters
$save_path(string) path were to store session data
$session_name(string) name of session
Returns
bool always TRUE

F_session_read (   $key)

Get session data.

Parameters
$key(string) session ID.
Returns
string session data.

F_session_string_to_array (   $sd)

Convert encoded session string data to array.

Author
Nicola Asuni
Since
2001-10-18
Parameters
$sd(string) input data string
Returns
array

F_session_write (   $key,
  $val 
)

Insert or Update session.

Parameters
$key(string) session ID.
$val(string) session data.
Returns
resource database query result.

getClientFingerprint ( )

Generate a client fingerprint (unique ID for the client browser)

Author
Nicola Asuni
Since
2010-10-04
Returns
string client ID

getNewSessionID ( )

Generate and return a new session ID.

Author
Nicola Asuni
Since
2010-10-04
Returns
string PHPSESSID

getPasswordHash (   $password)

Hash password for Database storing.

Parameters
$password(string) Password to hash.
Returns
string password hash

Variable Documentation

if (isset($_COOKIE[‘PHPSESSID’])) if (isset($_REQUEST[‘PHPSESSID’])) else
Initial value:
{
$PHPSESSID = getNewSessionID()
getNewSessionID()
Definition: tce_functions_session.php:212

 

© 2004-2017 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy