Axis 2400 - PHP3 GUIDE Manual page 64

Php3 guide
Table of Contents

Advertisement

Appendix C - PHP3 Script Examples
{
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
while( ($failures<(strlen($seq_sources)*2)) && (
($session_time<$time)||($time==-1) ))
{
// Check if an alarm has trigged
error_reporting(0);
if(is_file($alarm_file))
{
handle_alarm($session,$alarm_file);
}
error_reporting(E_ALL);
$loop_start = gettimeofday();
$active_buffer++;
if($active_buffer==strlen($seq_sources))
{
$active_buffer=0;
}
$source_file="/tmp/".$seq_buffer_prefix.substr
($seq_sources,$active_buffer,1)."/".$file_form
at.".jpg";
$tinfo = getdate(time());
error_reporting(0);
$dest =
$seq_destination.$seq_buffer_prefix.substr($se
q_sources,$active_buffer,1);
$dest .= "/" . conv($tinfo["year"]);
ftp_mkdir($session,$dest);
$dest .= "/" . conv($tinfo["mon"]);
ftp_mkdir($session,$dest);
$dest .= "/" . conv($tinfo["mday"]);
ftp_mkdir($session,$dest);
$dest .= "/" . conv($tinfo["hours"]);
ftp_mkdir($session,$dest);
$dest .= "/" . conv($tinfo["minutes"]);
ftp_mkdir($session,$dest);
$dest .= "/" . conv($tinfo["seconds"]);
$dest .= "_" .$loop_start["usec"].".jpg";
$structure_info=$tinfo;
if(is_file($source_file))
// Upload images as long as
//not too many errors have
//occured and session time
//hasn't been exceeded
// Loop through the indexes
//specified as sources
// Build the destination
//path both for the script
//and on the server
// If the source file is a
//present
63

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 2400 - PHP3 GUIDE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

2401 - php3 guide2420 - php3 guide240024012420

Table of Contents