Axis 2401 - PHP3 GUIDE Informacje Techniczne Strona 38

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 37
An Introduction to PHP3
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 38
system($command);
}
?>
4.2.5 Example 5 – Send Images via E-mail
This script will send 4 (2 pre-alarm and 2 post-alarm) images as attachments in an e-mail.
The parameters available are:
<?
$buffer_prefix = "CAM"; // The prefix of the name of the
//buffer(s) started
$sources = "1"; // The index of the name(s) of the
//buffer(s) started
$image_format = "fullsize"; // The format of the images
//specified to be taken
//according to the HTTP-API
$pre = 2; // Number of pre alarm images
//to be taken
$post = 2; // Number of post alarm
//images to be taken
$predelay = 1000; // Delay between pre images
//in milliseconds
$postdelay = 1000; // Delay between post
//images in milliseconds
$smtp_server = "mail.somewhere.com"; // The server to use as
//mail server
$subject = "test"; // The subject to use in
//the mail
$from = " [email protected]"; // The specified sender
$reply = " [email protected] "; // The specified recipient
//for replies
$cc = " [email protected] "; // The specified recipient for a
//copy of this mail
$body = "/tmp/var/log/messages"; // The body to insert into the
//mail. Note that this must be
//specified and point to a valid
//file
$to = " [email protected] "; // The specified recipient
Przeglądanie stron 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 84 85

Komentarze do niniejszej Instrukcji

Brak uwag