From Shenzhen XRC Tech Co.,Ltd.

CGI: Session CGI

Version / Author / DateModify
1.0/David/2013-03-30First edition


Users can  create, maintain,  end and query the Session through the CGI interface.
Users can got the returned Session ID after a Session is created, 
user can pass in the Session lifetime.A Session`s survival period is 10 minutes, 
users can authenticate if they use the session`s ID during their lifetime.
Then if the user call within 10 minutes, the lifetime of the Session will be extended by 10 minutes from the moment.Again and again,
Session survival can be maintained constantly.
 The login username/password which required in the mode of Parameter authentication. For example:
Users to create Session =
IP Camera Back
var session = 268480091;
var group = 65475;

Then the user as long as the call within 10 minutes
The lifetime of the Session will be extended by 10 minutes from the moment. The cycle can be achieved to maintain Session viable role.

Create Session


user/pwd:parameter authentication methods required to login username/password
  session/group:the return of the corresponding variable name set
  json/jsonp_callback:return the json type of data set
session:Creating a Session ID, 0 on behalf of Create Session failed.
  group:Create Session with permission, -1 means to create Session failed. Other values ​​are as follows:
Managers	0x1ffff
Visitors	Bit0:whether have the permission to access video
	Bit1:whether have the the permission to take photoes
	Bit2:whether have the the permission to take video
	Bit3:whether have the the permission to access audio
	Bit4:whether have the the permission to dialogue
	Bit5:whether have the the permission to control  
	IP Camera Returns:
     var session=268480091;
    var group=65475; 
    IP Camera Returns:
    var s=1891048766;
    var g=131071;
create_session.cgi has some difference from other CGI,if you use the authentication method of HTTP Basic Authentication to use create_session.cgi,it does not pop up a dialog box to prompt for a username / password,instead back directly:
  var session=0;
  var group=-1;

End Session


session:To end the Session ID
next_url: return to the page after the successful operation
	json/jsonp_callback:return the json type of data set
Operating results of text information or specified page

Query list of current IP Camera Session


user/pwd:parameter authentication method required to login username / password
session:Session authentication method required to Session ID
session_user/session_ip/number: returns the corresponding variable names Settings
json/jsonp_callback:return the json type of data set
If  back js text:
session_user:array variables, create the Session User Name
session_ip:array variables, create Session IP address
number:the number of variables in the array
 If the return json text
 Session array of objects, user and ip session objects include two elements
var user=new Array();
  var ip=new Array();
  var number=2;
Retrieved from
Page last modified on March 30, 2013, at 04:06 PM EST