remove $Id$ strings from everywhere that I can find
[spider.git] / cmd / show / db0sdx.pl
index c90ecf976215f810ed64f30c520437509ee6dd3b..1a7662f60d302659d6b1ad74880057ba1353806c 100644 (file)
@@ -2,8 +2,10 @@
 # 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$
 #
 
 my ($self, $line) = @_;
@@ -13,7 +15,9 @@ my @out;
 $line = uc $line;
 return (1, $self->msg('e24')) unless $Internet::allow;
 return (1, "SHOW/DB0SDX <callsign>, 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->.*$/';
 
@@ -35,8 +39,9 @@ if (!$info) {
        my $s = qq(<?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
-    <qslinfo xmlns="http://dotnet.grossmann.com/qslinfo">
+    <qslinfo xmlns="http://$target">
       <callsign>$line</callsign>
+      <ClientInformation>DXSpider V$main::version B$main::build ($call\@$main::mycall)</ClientInformation>
     </qslinfo>
   </soap:Body>
 </soap:Envelope>
@@ -47,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);