Appendix C - PHP3 Script Examples
$time = 60;
$alarm_file = "/tmp/alarm";
// Do not change the following 2 parameters
function handle_alarm($session,$alarm_file)
{
$alarm_buffer_prefix = "CAM";
$alarm_sources = "1";
$alarm_image_format = "fullsize";
$alarm_destination = "upload1/";
$pre = 2;
$post = 2;
$predelay = 1000;
$postdelay = 1000;
$smtp_server = "mail.somewhere.com";
$subject = "'Alarm trigged'";
$from = " someone@somewhere.com ";
$reply = " someone@somewhere.com ";
$cc = " someone@somewhere.com ";
$body = "/tmp/var/log/messages";
$to = " someone@somewhere.com ";
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
// The time, in seconds, to
//stay in this script. A
//value of -1 means
//indefinetly.
// The file that indicates
//an alarm event by its
//presence
// A function for handling
//alarm events by sending a
//note by use of SMTP and
//uploading the alarm
//buffers by using FTP
// The prefix of the name
//of the buffer(s) started
//for the alarm images
// The index of the name(s)
//of the buffer(s) started
//for alarm images
// The format of the images
//specified to be taken
//according to the HTTP-API
//for alarm images
// The path to append to
//alarm uploads. This path
//must exist on the server
//prior to upload.
// Number of pre images
// Number of post images
// Delay, in milliseconds,
//between pre images
// Delay, in milliseconds,
//between post images
// The server to use as
//mail server
// The subject to use in
//the mail
// The specified sender
// The specified receiver
//of replies
// The specified receiver
//of a copy of this mail
// The body to insert into
//the mail. Note that this
//must be specified and
//point to valid file
// The specified recipient
59
Need help?
Do you have a question about the 2400 - PHP3 GUIDE and is the answer not in the manual?
Questions and answers