Appendix C - PHP3 Script Examples
}
}
}
else
{
error_log("Could not login as ".$user." on ".$ftp_server,0);
}
ftp_quit($session);
}
else
{
error_log("Could not connect to ".$ftp_server,0);
}
error_log("Restarting buffer(s)",0);
for($c=0;$c<(strlen($sources));$c++)
{
$command="bufferd -reset -buffername
".$buffer_prefix.substr($sources,$c,1);
system($command);
$command="bufferd -start -buffername
".$buffer_prefix.substr($sources,$c,1)." -pre ".strval($pre)." -
post ".strval($post)." -predelay ".strval($predelay)." -postdelay
".strval($postdelay)." -uri
ftp://jpg/".substr($sources,$c,1)."/".$image_format.".jpg";
system($command);
}
?>
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($file_name = readdir($buffer_handle))
{
if(($file_name != ".") &&($file_name != ".."))
{
$file =
"/tmp/".$buffer_prefix.substr($sources,$i,
1)."/".$file_name;
$destination_name = $destination .
$buffer_prefix.substr($sources,$i,1);
$destination_name .=
strchr($file_name,"_");
if(!ftp_put($session, $destination_name,
$file, FTP_BINARY))
{
}
unlink($file);
}
}
closedir($buffer_handle);
// And for each file in the
//corresponding buffer
/directory
// That is a regular file
// extract timestamp from
//src, append to dst
// Upload that file to the
//FTP server
error_log("Could not upload file
".$file." as
".$destination_name."\n",0);
// Reset and restart buffers
38
Need help?
Do you have a question about the 2400 - PHP3 GUIDE and is the answer not in the manual?
Questions and answers