Axis 2400 - PHP3 GUIDE Manual page 53

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
for($c=0;$c<strlen($sources);$c++)
{
$dest =
$destination.$buffer_prefix.substr($sources,$c,1)
;
ftp_mkdir($session,$dest);
}
while( ($failures<(strlen($sources)*2)) && (
($session_time<$time)||($time==-1) ))
$loop_start = gettimeofday();
$active_buffer++;
if($active_buffer==strlen($sources))
{
$active_buffer=0;
}
$source_file="/tmp/".$buffer_prefix.substr($sourc
es,$active_buffer,1)."/".$file_format.".jpg";
$tinfo = getdate(time());
$dest =
$destination.$buffer_prefix.substr($sources,$acti
ve_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;
error_reporting(0);
if(is_file($source_file))
{
// Build initial paths on
//server
// 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
52

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

2401 - php3 guide2420 - php3 guide240024012420

Table of Contents