Appendix C - PHP3 Script Examples
if($value < 10) {
$value = "0$value";
}
return strval($value);
}
for($c=0;$c<(strlen($seq_sources));$c++)
{
$command="bufferd -start -buffername ";
$command.=$seq_buffer_prefix.substr($seq_sources,$c,1);
$command.=" -snapshot -pre 1 -predelay ";
$command.=strval($delay);
$command.=" -uri ftp://jpg/";
$command.=substr($seq_sources,$c,1);
$command.="/";
$command.=$seq_image_format;
$command.=".jpg -format ";
$command.=$file_format;
system($command);
}
$session = ftp_connect($ftp_server, $port);
if($session)
{
if(ftp_login($session, $user, $pass))
{
if (!ftp_pasv($session, $passive_mode == "yes"))
{
}
else
{
$dest = $seq_destination.$seq_buffer_prefix.substr($seq_sources,$c,1);
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
ftp_quit($session);
error_log("Could not set passive mode",0);
$start_time = gettimeofday();
$current_time = $start_time;
$session_time = 0;
$inc = 0;
$active_buffer = -1;
$failures=0;
error_reporting(0);
for($c=0;$c<strlen($seq_sources);$c++)
{
ftp_mkdir($session,$dest);
}
error_reporting(E_ALL); //converting single digit
//integers into two digit
//integers
// For each source
//specified, start a buffer
// Connection successfully
//established
// Successful login attempt
// Passive mode
//successfully set
// Build initial paths
62
Need help?
Do you have a question about the 2400 - PHP3 GUIDE and is the answer not in the manual?
Questions and answers