2 # Query the 425 Database server for a callsign
4 # from an idea by Leonardo Lastrucci IZ5FSA and information from Mauro I1JQJ
8 my ($self, $line) = @_;
9 my @list = map {uc} split /\s+/, $line; # generate a list of callsigns
11 my $call = $self->call;
14 return (1, $self->msg('e24')) unless $Internet::allow;
15 return (1, "SHOW/425 <callsign>, e.g. SH/425 3B9FR") unless @list;
16 my $target = $Internet::http_proxy || $Internet::dx425_url || "www.ariscandicci.it";
17 #my $target = $Internet::http_proxy || $Internet::dx425_url || "192.168.0.2";
18 my $port = $Internet::http_proxy_port || 80;
20 $url = 'http://' . ($Internet::dx425_url || 'www.ariscandicci.it'); # if $Internet::http_proxy;
21 #$url = 'http://' . ($Internet::dx425_url || '192.168.0.2'); # if $Internet::http_proxy;
25 my $t = new Net::Telnet;
29 $t->open(Host => $target,
34 push @out, $self->msg('e18', 'Open(425.org)');
36 my $s = "GET $url/modules.php?name=425dxn&op=spider&query=$l HTTP/1.0\n"
37 ."User-Agent:DxSpider;$main::version;$main::build;$^O;$main::mycall;$call;$l\n\n";
38 dbg($s) if isdbg('425');
40 Log('call', "$call: show/425 \U$l");
44 while (my $result = eval { $t->getline(Timeout => 30) } || $@) {
45 dbg($result) if isdbg('425') && $result;
54 push @out, $self->msg('e3', 'Search(425.org)', uc $l) unless @out;