X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fdb0sdx.pl;h=97f7a04ecabbe093f24c688afe3a800cbdede81b;hb=18f2934d60c7a702ac9eeca325914e4c346c0621;hp=2c5700448d7beb454f404650d4d2fc2edb48f64e;hpb=ed64ea9b9a101013cebeafaf76da0fc1a17722bf;p=spider.git diff --git a/cmd/show/db0sdx.pl b/cmd/show/db0sdx.pl index 2c570044..97f7a04e 100644 --- a/cmd/show/db0sdx.pl +++ b/cmd/show/db0sdx.pl @@ -2,6 +2,8 @@ # Query the DB0SDX QSL server for a callsign # # Copyright (c) 2003 Dirk Koopman G1TLH +# Modified Dec 9, 2004 for new website and xml schema by David Spoelstra N9KT +# and tidied up by me (Dirk) # # $Id$ # @@ -13,13 +15,17 @@ my @out; $line = uc $line; return (1, $self->msg('e24')) unless $Internet::allow; return (1, "SHOW/DB0SDX , e.g. SH/DB0SDX ea7wa") unless $line && is_callsign($line); -my $target = 'dotnet.grossmann.com'; +my $target = $Internet::db0sdx_url || 'www.qslinfo.de'; +my $path = $Internet::db0sdx_path || '/qslinfo'; +my $suffix = $Internet::db0sdx_suffix || '.asmx'; my $port = 80; my $cmdprompt = '/query->.*$/'; my($info, $t); $t = new Net::Telnet; + +dbg("db0sdx: contacting $target:$port") if isdbg('db0sdx'); $info = $t->open(Host => $target, Port => $port, Timeout => 15); @@ -28,11 +34,14 @@ if (!$info) { push @out, $self->msg('e18', 'DB0SDX Database server'); } else { + dbg("db0sdx: connected to $target:$port") if isdbg('db0sdx'); + my $s = qq( - + $line + DXSpider V$main::version B$main::build ($call\@$main::mycall) @@ -43,12 +52,12 @@ if (!$info) { dbg("db0sdx out: $s") if isdbg('db0sdx'); - $t->print("POST /qslinfo/qslinfo.asmx HTTP/1.0"); - $t->print("Host: dotnet.grossmann.com"); + $t->print("POST $path$suffix HTTP/1.0"); + $t->print("Host: $target"); $t->print("Content-Type: text/xml; charset=utf-8"); $t->print("Content-Length: $lth"); $t->print("Connection: Close"); - $t->print("SOAPAction: \"http://dotnet.grossmann.com/qslinfo/qslinfo\""); + $t->print(qq{SOAPAction: "http://$target$path"}); $t->print(""); $t->put($s);