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 26
function alert($host,$protocol,$port,$message)
{
...
}
$host (not null) The host-name or address to send the alert to.
$protocol Specify the protocol (0 = TCP, 1 = UDP). Default is '0'
$port The port to connect to. Default is '15'
$message the message to be sent (ASCII)
The timeout for a connection-attempt is 60 seconds. On error the function returns '1'
(connection failed), '2' (a parameter was missing) or '$SOCK_CONNECT_FAILED'.
If the connection failed this is logged in the syslog.
5.4.2 ftp.lib
This function has encapsulated the built-in PHP3-functions for FTP.
function
ftp($host,$user,$pass,$time,$delay,$source,$des
tination,$suffix,$countermax,$startcount,$port,
$passive_mode)
{
...
}
$host (not null) FTP Host-name
$user (not null) User-name
$password (not null) Password
$time
transfer period in seconds (time < 0 is infinite (i.e. never
leave this function), time >= 0 is once).
$delay delay between transfers in milliseconds.
$source
(not null) Source specification.
If the source file is a directory then the command tries to
transfer each file in this directory.
When transferring a whole directory, time and delay are
ignored.
$destination (not null) Destination specification.
$suffix
Defines the type of stamp to be added to the filename.
Valid o
p
tions are: "default"
,
"date"
,
"se
q
uence"