How to change the settings of IP Camera?


User should send the predefined HTTP requests to IP Camera. After camera receives the requests, it changes the corresponding settings.
For example, if user want to add another user named iwatcher, whose password is success, he/she should send HTTP request as below:
 http://192.168.0.1/SetUser.cgi?User=iwatcher&Pass=success
(suppose that the IP of camera is 192.168.0.1)

IP Camera would send the response to the client, which is probably not what the html makers require. "RedirectUrl" is supported in some HTTP request, and the responsing web page can be redirected to the address specified by "RedirectUrl". Suppose that browser should be switch to "http://192.168.0.1/Show.htm" after a user was added, the HTTP request should be:
 http://192.168.0.1/SetUser.cgi?User=iwatcher&Pass=success&RedirectUrl=Show.htm
in HTML

<form action="/SetUser.cgi">
 <input name=User>
 <input name=Pass>
 <input type=hidden name=RedirectUrl value="/Show.htm">
 <input type=submit value=OK>
</form>

How to get the settings of IP Camera?

User can get current camera status by calling /GetStatus.cgi. To get other status or settings, the corresonding requests can be send to the camera HTTP server. For example, if user want to get the users list of IP Camera, he can visit:
 http://192.168.0.1/GetUser.cgi
A character string of users list will be returned.
Is it urgy? Yes, the users list should be decorated, and be shown more beautifully. Considering this feature, a JavaScript text so that HTML can show the text in various way is also supported. Visit:
 http://192.168.0.1/GetUser.cgi?JsVar=sUserList
(here sUserList can be replaced by other value). The JavaScript text returned is as the below:
sUserList='administrator\nwinbond\n';
in HTML:

<html>
<head>
<script src="/GetUser.cgi?JsVar=sUserList"></script>
</head>
<body>
<script>
alert(sUserList);
</script>
</body>
</html>


Further more, a feature named "OnJs" is aslo support, eg:  http://192.168.0.1/GetUser.cgi?JsVar=sUserList&OnJs=MyFun
The JavaScript text returned is as the below:
sUserList='administrator\nwinbond\n';
MyFun(this);

It's maybe helpful in case that user want call a function immediately after he get the settings .