User Guide

Appendix A – Included Application
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.91 June 2001 30
function ppp_offline($behavior, $sec)
{
...
}
Close ppp connection
$behavior describes the type of behavior of the ppp connection and can be either
"CloseAfter" or "Optimized".
$sec is the time in seconds to wait before calling ppp_stop() if
$behaviour="CloseAfter". If $behaviour="Optimized" no waiting is done, ppp_stop is
called immediatly.
5.4.6 Examples of usage
The first example depicts how to use the FTP-function in combination with the
bufferd-example:
<?php
include "/usr/php/ftp.lib";
include "/usr/php/log.lib";
$host="host.domain";
$user="user";
$pass="password";
$time="0";
$delay="0";
$source="/tmp/SNAP/snapshot.jpg";
$destination="snapshot.jpg";
$suffix="date";
$countermax="";
$startcount="";
$port="21";
$passive_mode="on";
shoot();
$res = ftp($host, $user, $pass, $time, $delay, $source,
$destination, $suffix, $countermax, $startcount, $port,
$passive_mode);
if($res == 1)
{
log("upload script - Could not connect the host");
}
else if($res == 2)
{
log("upload script - Could not login on host");
}
else if($res == 3)
{