#!/usr/bin/perl -T
#
# $FreeBSD: www/en/cgi/ftp.cgi,v 1.3 2000/04/03 08:45:51 phantom Exp $
require './cgi-lib.pl';
require './cgi-style.pl';
$newloc = "http://www.FreeBSD.org/";
print &html_header("FTP Download");
open (MIRRORS, "ftp.mirrors");
print "
Download $ARGV[0] from one of the following mirror sites:
\n";
$oldplace = "";
while () {
if (/.*:.*:/ && !/^#/) {
($place, $site, $root) = split(':',$_);
chop $root; $root =~ s/ *$//;
if ($place ne $oldplace) {
if ($oldplace ne "") {
print "\n";
}
print "$place\n\n";
$oldplace = $place;
}
print "- $site
\n";
}
}
close (MIRRORS);
print "
\n";
print &html_footer;