User manual AXIS 2401 PHP3 GUIDE

DON'T FORGET : ALWAYS READ THE USER GUIDE BEFORE BUYING !!!

If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Diplodocs provides you a fast and easy access to the user manual AXIS 2401. We hope that this AXIS 2401 user guide will be useful to you.


AXIS 2401 PHP3 GUIDE: Download the complete user guide (398 Ko)

Manual abstract: user guide AXIS 2401PHP3 GUIDE

Detailed instructions for use are in the User's Guide.

[. . . ] 1. 1 WHAT IS PHP 3 4 5 6 6 7 8 8 9 10 12 13 14 14 16 16 17 17 20 20 20 21 21 21 22 22 22 23 24 25 25 26 27 27 28 30 2 PHP3 AND THE VIDEO SERVER 3 PHP3 SCRIPT 3. 1 LIMITATIONS 3. 2 REQUIREMENTS FOR GETTING STARTED: 3. 3 SCRIPTS 3. 3. 1 COMPLETE SCRIPT EXAMPLES 3. 3. 2 SCRIPT GENERATED BY THE APPLICATION WIZARD 3. 3. 2. 1 Get the script that the wizard in the Video Server has created 3. 3. 3 THE TASK-SCHEDULER 3. 3. 3. 1 Syntax 3. 3. 3. 2 Examples 3. 3. 4 PUT A NEW OR CHANGED SCRIPT INSIDE THE VIDEO SERVER: 3. 3. 5 HOW TO ACTIVATE THE SCRIPTS?3. 3. 5. 1 URL 3. 3. 5. 2 Telnet 3. 3. 5. 2. 1 To enable Telnet support 4 TROUBLESHOOTING 4. 1 PHP3 SCRIPT RELATED PROBLEMS 4. 2 PRODUCT RELATED PROBLEMS 5 APPENDIX A ­ INCLUDED APPLICATION 5. 1 INTRODUCTION 5. 2 THE SHELL - SH 5. 2. 1 BUILT IN COMMANDS 5. 3 THE IMAGE-BUFFER - BUFFERD 5. 3. 1 OPTIONS 5. 3. 1. 1 By Default 5. 3. 2 EXAMPLES 5. 4 THE PHP-LIBS 5. 4. 1 ALERT. LIB 5. 4. 2 FTP. LIB 5. 4. 3 LOG. LIB 5. 4. 4 MAIL. LIB 5. 4. 5 PPP. LIB 5. 4. 6 EXAMPLES OF USAGE Axis Communications AB does not provide 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 0. 91 June 2001 1 PHP3 Guide 6 APPENDIX B - SHELL COMMANDS 6. 1 7 7. 1 COMMANDS APPENDIX C - PHP3 SCRIPT EXAMPLES SCRIPT EXAMPLES 32 32 35 36 Axis Communications AB does not provide 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 0. 91 June 2001 24 Appendix A ­ Included Application bufferd -start -buffername ALARM -uri ftp://axis-cgi/jpg/1/halfsize. jpg -pre 5 -post 2 -postdelay 2000 (This starts the buffer and can be specified in a start-up script or as an event for utask) When an event occurs, as specified for utask (see below) the following command sequence is used to handle the buffer: bufferd -stop ALARM { handle images} bufferd -reset ALARM bufferd -start -buffername ALARM -uri ftp://axis-cgi/jpg/1/halfsize. jpg -pre 5 -post 2 -postdelay 2000 The handling of the images can for instance be done with the PHP3-function 'ftp()' below (see also /usr/php/template_upload_cont. php3 on the device). 5. 4 The PHP-libs Included in the distributed firmware are a few PHP3-scripts that define functions, which are intended to help developers use the camera's functionality. Currently the included files are: /usr/php/alert. lib /usr/php/ftp. lib /usr/php/log. lib /usr/php/mail. lib /usr/php/ppp. lib In order to use these functions the files need to be included in the script using them. The arguments used in the function-calls are also required to be defined/declared in the calling script. 5. 4. 1 alert. lib This script implements a function that connects to a host and leaves a message. This function requires an application be running on the contacted host that can handle the alert. Axis Communications AB does not provide 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 0. 91 June 2001 25 Appendix A ­ Included Application function alert($host, $protocol, $port, $message) { . . . } $host $protocol $port $message (not null) The host-name or address to send the alert to. Default is '15' the message to be sent (ASCII) The timeout for a connection-attempt is 60 seconds. On error the function returns '1' (connection failed), '2' (a parameter was missing) or '$SOCK_CONNECT_FAILED'. If the connection failed this is logged in the syslog. 5. 4. 2 ftp. lib This function has encapsulated the built-in PHP3-functions for FTP. function ftp($host, $user, $pass, $time, $delay, $source, $des tination, $suffix, $countermax, $startcount, $port, $passive_mode) { . . . } $host $user $password $time $delay (not null) FTP Host-name (not null) User-name (not null) Password transfer period in seconds (time < 0 is infinite (i. e. If the source file is a directory then the command tries to transfer each file in this directory. Valid options are: "default", "date", "sequence", $source $destination $suffix Axis Communications AB does not provide 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 0. 91 June 2001 26 Appendix A ­ Included Application "sequence_max". Only applies when $suffix = ("sequence"|"sequence_max"). $passive_mode In passive mode, data connections are initiated by the client, rather than by the server. On error, the function returns '1' (connection failed), '2' (login failed), '3' (upload failed), '4' (parameter error) or '5' (could not set passive mode). Parameter error occurs when any of $host, $user, $pass, $source or $destination is unspecified, or the parameter $suffix has an invalid value. 5. 4. 3 log. lib This function allows a PHP3-script to append an entry to the system log. } $message Message to be appended to the system log The function makes a call to the PHP3-function 'error_log($message, 0)'. 5. 4. 4 mail. lib This function issues a system call to smtpclient. [. . . ] Note that this //must be specified and //point to valid file $to = " someone@somewhere. com "; // The specified recipient Axis Communications AB does not provide 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 0. 9 May 2001 59 Appendix C - PHP3 Script Examples There is no need to edit anything below the line. error_reporting(0); unlink($alarm_file); error_reporting(E_ALL); for($c=0;$c<(strlen($alarm_sources));$c++) { // Stop the alarm buffers $command="bufferd -stop -buffername ". $alarm_buffer_prefix. substr($alarm_sources, $c, 1); system($command); } // Send the mail $command = "smtpclient"; $command . =" -S ". $smtp_server; $command . =" -s ". $subject; $command . =" -f ". $from; $command . =" -r ". $reply; $command . =" -c ". $cc; $command . =" -b ". $body; $command . =" ". $to; exec($command); for($b=0;$b<(strlen($alarm_sources));$b++) { // Wait for the buffers to //stop, as indicated by an //existing status file in //the buffer directories $status_file = "/tmp/". $alarm_buffer_prefix. substr($alarm_sources, $b, 1). "/statu s"; error_reporting(0); while(!is_file($status_file)) { sleep(($predelay+$postdelay)/1000); } error_reporting(E_ALL); unlink($status_file); } if($session) { // Connection is //established for($i=0;$i < (strlen($alarm_sources));$i++) { // For each source //specified $directory="/tmp/". $alarm_buffer_prefix. substr($alarm_sour ces, $i, 1); $buffer_handle = opendir($directory); Axis Communications AB does not provide 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. [. . . ]

DISCLAIMER TO DOWNLOAD THE USER GUIDE AXIS 2401




Click on "Download the user Manual" at the end of this Contract if you accept its terms, the downloading of the manual AXIS 2401 will begin.

 

Copyright © 2015 - manualRetreiver - All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.