X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2F425.pl;h=4328e3aca85e0af5aa9ffc548972057feac477d7;hb=01c7ebc6ec371bc6e075a599dad1d5f3fd1b776a;hp=c825b91bded67e6e7c8f1e7e6d4799dcc10e6e4b;hpb=5177a6684a57135fa9602c33227c6ab1c8f32a51;p=spider.git diff --git a/cmd/show/425.pl b/cmd/show/425.pl index c825b91b..4328e3ac 100644 --- a/cmd/show/425.pl +++ b/cmd/show/425.pl @@ -3,7 +3,7 @@ # # from an idea by Leo,IZ5FSA and 425DxNews Group # -# $Id$ +# # my ($self, $line) = @_; my @list = map {uc} split /\s+/, $line; # generate a list of callsigns @@ -14,9 +14,9 @@ my @out; return (1, $self->msg('e24')) unless $Internet::allow; return (1, "SHOW/425 \nSHOW/425 CAL\nSHOW/425 BULL \n e.g. SH/425 IQ5BL, SH/425 CAL, SH/425 BUL 779\n") unless @list; -my $target = "www.ari.it"; +my $target = "www.ariscandicci.it"; my $port = 80; -my $url = "http://www.ari.it"; +my $url = "http://www.ariscandicci.it"; use Net::Telnet; my $t = new Net::Telnet; @@ -38,19 +38,23 @@ if (!$t || $@) { else { $op="op=search&query=".$list[0]; } - my $s = "GET $url/hf/dx-news/spider.php?$op HTTP/1.0\n" - ."User-Agent:DxSpider;$main::version;$main::build;$^O;$main::mycall;$call;$list[0]\n\n"; + my $s = "GET /425dxn/spider.php?$op HTTP/1.1\n" + ."User-Agent:DxSpider;$main::version;$main::build;$^O;$main::mycall;$call;$list[0]\nHost: $target\n\n"; dbg($s) if isdbg('425'); $t->print($s); Log('call', "$call: show/425 \U$op"); my $state = "blank"; my $count = 1; - while (my $result = eval { $t->getline(Timeout => 30) } || $@) { + my @timeout = qw(Timeout 30); + while (my $result = eval { $t->getline(@timeout) } || $@) { dbg($result) if isdbg('425') && $result; + dbg($@) if isdbg('425') && $@; ++$count; if ($count > 9) { + last if $@; push @out, $result; } + @timeout = qw(Timeout 2); } $t->close; push @out, $self->msg('e3', 'Search(ARI.org)', uc $op) unless @out;