System information

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 36
error_reporting(0);
if($fd = fopen("/tmp/counter","w"))
{
$buf =
fwrite($fd,strval($current_counter
));
fclose($fd);
}
error_reporting(E_ALL);
$inc = 0;
}
}
else if($suffix == "sequence")
{
if($current_counter > $counter_max)
{
$counter = 1;
}
$dest .= "_" . strval($current_counter);
$inc++;
if($inc >= $buffer_count)
{
$current_counter++;
error_reporting(0);
if($fd = fopen("/tmp/counter","w"))
{
$buf =
fwrite($fd,strval($current_counter
));
fclose($fd);
}
error_reporting(E_ALL);
$inc = 0;
}
}
$dest .= ".jpg";
error_reporting(0);
if(is_file($source_file))
{ //If the source file is present
if(!ftp_put($session, $dest, $source_file,
FTP_BINARY))
{ //Upload the source file
$failures++;
error_log("Could not upload file
".$source_file." as ".$dest." on
".$ftp_server,0);
}
else
{ //If successful upload, remove the
//uploaded file indicating capture
//of a new image
$failures=0;
unlink($source_file);
}
}
else
{
error_reporting(E_ALL);
$failures++;