Here's part of it... I think it's failing during this piece:
Code:
########## definition of Socket.
use IO::Socket;
############# definition of Alarm(Timeout Function).
$sig{ALRM} = sub { exit (0); };
alarm ($TIMEOUT);
$modxxr =~ s/\n//s;
if (-e "$comftaf/$modxxr") {
require "$comftaf/$modxxr";
}
else {
exit (0);
}
if ($senam && $url && $parse) {
}
else {
exit (0);
}
#######
open (modka, "$comftaf/$modxxr");
@moduka = <modka>;
close (modka);
$moduka2 = "";
foreach $moduka3 (@moduka) {
$moduka2 .= $moduka3;
}
if (!$sprotocol) {
$sprotocol = "tcp";
}
if (!$speerport) {
$speerport = "80";
}
if (!$sreuse) {
$sreuse = "1";
}
if (!$shtmlsta) {
$shtmlsta = "<html.*?>";
}
if (!$shtmlend) {
$shtmlend = "</html>";
}
########
open (md1, ">>$cacdtaf/metayak-$countx-$ifor");
print md1 "$senam\n";
close (md1);
########################
##
##
##
$url1 = "$url";
$url1 =~ s/http:\/\///s;
@urlnfile1 = split (/\//, $url1);
$filex1 = $url1;
$filex1 =~ s/$urlnfile1[0]\///s;
$server1 = "$urlnfile1[0]";
$document1 = "$filex1";
###
$EOL = "\015\012";
$BLANK = $EOL x 2;
###
$remote1 = IO::Socket::INET->new(Proto=>"$sprotocol", PeerAddr=>$server1, PeerPort=>"$speerport", Reuse => $sreuse,);
$remote1->autoflush(1);
###
if ($rfullurl eq "yes") {
print $remote1 "GET $url HTTP/1.0" . $BLANK;
}
else {
print $remote1 "GET /$document1 HTTP/1.0" . $BLANK;
}
###
$sw2x = 0;
while ($input1 = <$remote1>) {
if ($input1 =~ /$shtmlsta/i) {
$sw1 = 1;
}
if ($input1 =~ /$shtmlend/i) {
$result .= $input1;
$sw1 = "";
close $remote1;
$sw2x = 1;
close (md1);
}
if ($sw1) {
$result .= $input1;
}
}
#############
It's the script you helped me with (the one I had Windows linefeeds in...). It runs now, but doesn't return any results.
Sean