System information
Using scripts in Axis Camera/Video products
Axis Communications AB provides NO support for application development of any kind. The information
here is provided "as is", and there is no guarantee that any of the examples shown will work in your
particular application.
Revision 1.02 October 2002 18
3.4.4 shttpclient
This client is used for HTTP connections. Its main uses are;
• for sending alarm notifications to a remote web server by simply accessing a URL with a
CGI-script
• for uploading images/files via HTTP
• for sending dynamic information such as when a IP-number is received via DHCP
The shttpclient supports basic authentication for web servers and proxy servers.
Usage: shttpclient [options] url
Option Description
-i
Input_file
-o
Output_file.
-u
The user
-w
The user’s password.
-x
The address of the proxy server
-n
The port to use on the proxy server.
-a
The user name to use for the proxy server.
-b
The password the user must supply to use the proxy server.
Examples
Fetch a single live image from the camera webserver and store it on the same camera as
/tmp/snap.jpg
:
• Use the local host http://127.0.0.1 as a simple method of fetching single live images
from the camera for temporary storage on /tmp/, prior to SMTP or FTP transfer.
• shttpclient can trigger any of the functions in the HTTP-API for Axis cameras/video
servers.
shttpclient -o /tmp/snap.jpg http://127.0.0.1/axis-cgi/jpg/image.cgi
Upload the file /tmp/snap.jpg to a remote web server. (The script upload.cgi must be able
to receive the incomming file). Log on as user
username with password mypass.
shttpclient -i /tmp/snap.jpg -u username -w mypass
http://www.somewhere.com/cgi-bin/upload.cgi
Send an alarm with CGI information (alarm=dooralarm) in the URL.
shttpclient -u username -w mypass
'http://www.somewhere.com/cgi-bin/trigger.cgi?alarm=dooralarm'
shttpclient Tips