=encoding utf8

=head1 NAME

simpleftp - Rudimentary FTP and HTTP(S) client

=head1 SYNOPSIS

B<simpleftp> I<url> [...]

=head1 DESCRIPTION

B<simpleftp> is a Perl script that provides basic support for fetching files
in a batch oriented fashion.  It takes one or more FTP or HTTP(S) URLs on
the command line.  The file(s) will be retrieved from the remote FTP or web
server(s) and placed in the current directory with the same basename as on
the remote; e.g., L<https://downloads.isc.org/pub/usenet/CONFIG/active.gz> is
stored as F<active.gz> in the current directory.

The script properly understands usernames, passwords and ports specified
as follows:

    ftp://user:password@host:port/path/file

B<simpleftp> has a hard-coded timeout of 30 seconds.  It uses binary mode and
passive mode for FTP data transfers.

It exits with status 0 on success.  Otherwise, the exit status is the number
of failed transfers.

INN only uses B<simpleftp> when running B<actsyncd>.  If B<wget> (or also
B<ncftpget> or B<ncftp> for the sole scope of FTP) is found at configure time,
then it will be used instead of this script.

=head1 BUGS

B<simpleftp> is an extremely poor substitute for more complete programs
like the freely available B<wget> utility you are encouraged to use instead.
It was written only to provide elementary support in INN for non-interactive
fetching of the files in L<https://downloads.isc.org/pub/pgpcontrol/>
or L<https://downloads.isc.org/pub/usenet/CONFIG/> without requiring
administrators to install yet another package.  Its shortcomings as a general
purpose program are too numerous to mention, but one that stands out is that
downloaded files by B<simpleftp> override existing files with the same name in
the local directory.

HTTP support requires the C<HTTP::Tiny> Perl module, only installed in Perl
5.14.0 and above as a Perl core module.  Besides, the C<IO::Socket::SSL> and
C<Net::SSLeay> Perl modules are required for HTTPS support.  In case they are
not installed, B<simpleftp> cannot handle these protocols.

=head1 HISTORY

Tossed off by David C Lawrence <tale@isc.org> for InterNetNews.
Rewritten to use C<HTTP::Tiny> and C<Net::FTP> by Julien Élie.

=head1 SEE ALSO

actsync(8).

=cut
