9 562 brands
2 694 000 user's guides


Download your manual, it's FREE! Diplodocs allows you to download several types of document in order to best use your Scanner AXIS 2400 : user manual, user guide, instruction manual.
Search a brand
Advanced Search

Need help using a product?
Look at the reviews on AXIS 2400

User manual AXIS 2400 - PHP3 GUIDE

Diplodocs help download the user guide AXIS 2400 - PHP3 GUIDE Scanner.

Download the complete user guide (398 Ko)





Preview of the first 3 pages of manual

You either have JavaScript turned off or an old version of Adobe Flash Player
Get the latest Flash Player.
Manual abstract: user guide AXIS 2400 - PHP3 GUIDE

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

PHP3 Guide 2400/2401/2420 PHP3 Guide 1 WHY PHP? 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 2 PHP3 Guide 1 Why PHP? PHP, which stands for "PHP: Hypertext Preprocessor" was chosen as the scripting language to use in some Axis Video products since: ! ! ! ! PHP is a well-known and widely used scripting language; in Feb 2001 an estimate of 23% of all Internet web servers used PHP (nearest "competing" script language was Perl with about 7%). The language syntax closely resembles Java, Perl and C, making it easy to learn for anyone with basic programming skills. Version 3, PHP3 could easily be scaled down to a smaller footprint required for embedded devices. PHP enables the creation of dynamic web pages quickly; the PHP code is simply embedded into the HTML code. At the most basic level PHP can do anything that any other scripting language or CGI program can do, such as collect html form data and generate dynamic page content. PHP is a complete scripting language with functionality such as file operations, network sockets, e-mail client (SMTP) and an FTP client. All very useful in Network Camera applications. ! The integration of event handling in Axis Video products, and a powerful scripting language such as PHP, gives knowledgeable developers endless opportunities to tailor the functionality of Axis Video products to fit their specific needs. 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 3 PHP3 Guide 1.1 What is PHP PHP (officially "PHP: Hypertext Preprocessor") is a server-side HTML-embedded scripting language. Simple answer, but what does that mean? An example: Example 1-1. An introductory example 1 2 3 4 Example 5 6 7 8 9 10 Notice how this is different from a CGI script written in other languages like Perl or C -- instead of writing a program with lots of commands to output HTML, you write an HTML script with some embedded code to do something (in this case, output some text). The PHP code is enclosed in special start and end tags that allow you to jump into and out of PHP mode. What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server. If you were to have a script similar to the above on your server, the client would receive the results of running that script, with no way of determining what the underlying code may be. You can even configure your web server to process all your HTML files with PHP, and then there's really no way that users can tell what you have up your sleeve. A lot of information about PHP can be found on the Internet: http://www.PHP.net 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 4 PHP3 Guide 2 PHP3 and the Video Server Axis has removed some functions from the standard PHP3, and created some additional functions to suit our products. The name of Axis´ modified version of PHP3 is called PHP3-Lite. The functions among others, that are removed are those that handle: ! ! ! Database functions PDF functions Mathematic functions Axis recommends checking that PHP3-Lite supports the functions required before creating custom scripts. This can be checked by looking in the PHP3-Lite manual on our Web site: http://www.axis.com There are some applications that are shipped with the Axis 2400/2401 products; besides these applications the additional PHP3-scripts that define extra functions are explained in Appendix A at the end of this document. 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 5 PHP3 Guide 3 PHP3 script Before making custom scripts Axis recommends looking at our PHP3-Lite manual (short description about this on the previous page). You can find the manual on the Axis Web site: http://www.axis.com Note: Axis Communications AB provides no guarantee that any of the examples shown here will work for a particular application. Axis Communications AB cannot and will not be held liable for any damage inflicted to any device as a result of the examples or instructions mentioned in this document. Axis Communications AB reserves the right to change this document without prior notice. !!! WARNING !!! Please keep in mind that the manufacturer of the flash chips estimates the number of writes to the flash chips to about 100,000. Writing a lot of temporary files to flash must thus be avoided. Use the ram disk mounted on /tmp instead. 3.1 Limitations For the moment it is not possible to activate more than one script at a time. So if many scripts need to be running at the same time, then delay upgrading the Video Server with Linux! Note: It´s not possible to downgrade to OSYS again, after having upgraded to Linux 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 6 PHP3 Guide 3.2 Requirements for getting started: ! ! ! Web browser FTP Client Text Editor Recommended: ! FTP Server ! SMTP Server 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 7 PHP3 Guide 3.3 Scripts Tip: A very useful program to fetch or upload a script to the product, is Ultra Edit; This can be downloaded from the following Web site: http://www.ultraedit.com/ Tip: To log all possible errors, include the row error_reporting(E_ALL); in the script. Turn off this option with the row: error_reporting(0); 3.3.1 Complete script examples It´s possible to create scripts and put them inside the video server. In Appendix C of this document are complete PHP3 scripts that can be used, which are customized for the most common applications. To run these scripts a task.list file for each script is attached (read more about task.list in section 3.3.3). Scripts for the following applications are available: ! ! ! ! A script that will upload specified images buffers via FTP and the Ethernet interface. A script that will upload specified image buffers via FTP and the Ethernet interface, and also send a mail as specified A script that will upload specified sequential images via FTP and the Ethernet interface. The uploaded images will be named according to the parameter $suffix. A script that will upload specified sequential images via FTP and the Ethernet interface. The uploaded images will be ordered in a structure defined by their date. A script that will upload specified image buffers via SMTP and the Ethernet interface. A script that will upload specified sequential images via FTP and the Ethernet interface. The uploaded images will be ordered in a structure defined by their date. Upon alarm event (indicated by an existing file named according to $alarm_file) images from the alarm buffers will be uploaded and a mail will be sent as specified by the appropriate parameters. ! ! How to upload a script to the video server and to run it is shown in section 3.3.4 and 3.3.5. 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 8 PHP3 Guide 3.3.2 Script generated by the Application Wizard The wizard in the video server can generate the most basic scripts, and these can then be extended and modified to fit a particular applications needs though Axis recommends creating the scripts from scratch and putting them inside the video server. How to accomplish the above, follow the instructions on the next page. 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 9 PHP3 Guide 3.3.2.1 Get the script that the wizard in the Video Server has created Start by going through the wizards in the Video Server, then open an FTP session to the Video Server. Follow the instructions below to see how this can be accomplished: Open a DOS session and type the following commands: 1. Go to the path where the script is saved Eg: c:\axis\php 2. ftp Eg: ftp 10.13.9.73 3. Type the user name Eg: user name: root 4. Type the password Eg: password: pass 5. Type: bin 6. Type: hash 7. Type: cd etc At startup, utask reads the file /etc/task.list and parses it for event entries. Therefore, it must be fetched to be able to run the script in an automatic fashion. (See also section 3.3.3 The task-Scheduler.) 8. Type: get task.list 9. Type: cd php 10. Type ls to see the file names for the files that the wizard has created: Ex: ls 11. Type: get 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 10 PHP3 Guide Note: After having created a script with the application wizard, push the remove button or restart the unit before creating a new one! (This doesn't work if it's a script that has been created from scratch, then the script has to be killed by using telnet). After following the steps on the previous page, it is possible to look at the script that the wizard in the Video Server has created (use for example Notepad to open the script). Wizard Variables Explanation $buffer_prefix = " "; $source[] = The prefix of the name of the buffer(s) started. The index or the name(s) of the buffer(s) started. The value must match the bufferd arguments. The format of the images specified to be taken according to the HTTP-API. The name to be given to the local file, excluding the extension. Number of pre alarm images to be taken. Number of post alarm images to be taken. Delay between pre images in milliseconds. Delay between post images in milliseconds. The server to upload to The body to insert into the mail. Note that this must be specified and point $image_format = " "; $file_format = " "; $pre = ; $post = ; $predelay = ; $postdelay = ; $host = "10.13.9.70"; $body = ""; 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 11 PHP3 Guide to valid file. $user = "anonymous"; $pass = "pass"; $port = "21"; $passive_mode = "no"; $time = "0"; The user to login as. The password to use for the us ...

  Know our Partners   Frequently Asked Questions   Contact Diplodocs team   Last searches
Latest additions
  Sitemap
Brands starting with A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
Copyright © 2005 - 2008 - Diplodocs - All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.