";
print "connecting $space[$cityindex] ...";
@stream = &GetHTTP($space[$cityindex], "/");
foreach $s (@stream) { print FILE $s; print "."; }
print FILE "<\div>";
$cityindex++; if ($cityindex > 2) { $cityindex = 0; }
print FILE "
";
print "connecting $space[$cityindex] ...";
@stream = &GetHTTP($space[$cityindex], "/");
foreach $s (@stream) { print FILE $s; print "."; }
print FILE "<\div>";
$cityindex++; if ($cityindex > 2) { $cityindex = 0; }
print FILE "
";
print "connecting $space[$cityindex] ...";
@stream = &GetHTTP($space[$cityindex], "/");
foreach $s (@stream) { print FILE $s; print "."; }
print FILE "<\div>";
print FILE "
THREE POINTS IN SPACE - WITH HELP FROM
SASSEN<\title><\head>";
exit;
sub GetHTTP {
local($hostname, $doc) = @_;
local($port, $iaddr, $paddr, $proto, $line, @output);
# ignore the "host:port" notation, and assume http=80 everytime.
socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp')) || die
"socket(): $!\n";
$paddr = sockaddr_in(80, inet_aton($hostname));
connect(SOCK, $paddr) || die "connect(): $!\n";
select (SOCK); $| = 1; select(STDOUT);
# send the HTTP-Request
print SOCK "GET $doc HTTP/1.0\n\n";
# now read the entire response:
do { $line = } until ($line =~ /^\r\n/);
@output = ;
close(SOCK);
return @output;
}