Parameter |
Default |
Description |
Global variables |
$gDontCreateSessionForSpider | true | Flag to check that this is not a search engine before opening a session. |
$gUserAgentHaveNot | (mozilla)|(opera) | RegExp - an expression whose non-execution identifies the user as a search engine. |
$gUserAgentHave | (bot)|(slurp)|(spider) | RegExp - an expression whose execution identifies the user as a search engine. |
$gSpiderIp | array() | An array of IP addresses that are considered search engines. For example, array('142.122.123.144', '192.168.1.*', '122.145.20-210.*'). |
Session () |
Constructor of the class, returns a pointer. |
Create ($mSessionName, $mDomain, $mLifeTime, $mPath) |
Creates a session, or resumes an existing session. |
$mSessionName |
<blank>. |
The session name unique to the site. |
$mDomain | <blank> | The domain of the cookie, e.g. 'melbis.com'. To make cookies visible to all subdomains, you must put a dot before the domain name, e.g. '.melbis.com'. |
$mLifeTime | 0 | The lifetime of the session cookie in seconds. This parameter has a value only if the cookie domain is specified. |
$mPath | / | The path in the domain where the cookie will work. Use a single slash ('/') for all paths in the domain. The parameter only has a value if the cookie domain is given. |
GetId ()
|
Returns the ID of the current session. |
Suspend () |
Suspends the session by temporarily closing it. |
Resume () |
Resumes the session if it has been suspended. |
Remove () |
Performs a final closing of the session and deletes its identifier. |
SetValue ($mKey, $mValue) |
Sets a value for a session variable. |
$mKey | | The name of the variable. |
$mValue | | The value of the variable. |
GetValue ($mKey) |
Returns the value of the session variable. |
$mKey | | The name of the variable. |
RemoveValue ($mKey) |
Removes a session variable. |
$mKey | | Variable name |