CreateWebSession (open)
Create a new session
Syntax
LOADLIB "mod::system/lib/webserver.whlib";
STRING FUNCTION CreateWebSession(STRING scope, RECORD sessdata, INTEGER maxidle_minutes, BOOLEAN limit_to_server, STRING sessionid)
Parameters
STRING scope
Scope for session (must be unique for each CreateWebSession usage so users can't try to get other GetWebSessionData readers to use their calls)
RECORD sessdata
Initial session data
INTEGER maxidle_minutes
Time without references to pass after which this session expire, in minutes
BOOLEAN limit_to_server
True if this session should only be available for requests to this webserver
STRING sessionid
Return value
STRING
A random session id which can be used to refer to the session
Description
Create a session, and set its initial data and expiry time. Note that a sesson can't expire while any scripts that referred to it are still running