wget https://www.mydomain.com/cgi-bin/ss/db_xml.cgi?startorder=5000053&endorder=5000053&version=7.1 --http-user=myusername --http-passwd=mypasswd --output-document=/local/path/where/I/want/my/file.xml --quiet
#!/usr/bin/perl
### settings
$usernamecolonpasswd = "myusername:mypasswd";
$domainname = "www.mydomainname.com";
$bocgipath = "/cgi-bin/ss";
$startorder = "5000053";
$endorder = "5000053";
$ssversion = "7.1";
### program
use IO::Socket;
use MIME::Base64;
$socket = IO::Socket::INET->new(Proto => 'tcp',
PeerAddr => $domainname,
PeerPort => 80,
Timeout => 10,
Type => SOCK_STREAM)
or die "Couldn't connect to $domainname on port 80!";
$encoded = encode_base64($usernamecolonpasswd);
print $socket ("GET
$bocgipath/db_xml.cgi?startorder=$startorder&endorder=$endorder&version=$ssversion
HTTP/1.1\nHost: $domainname\nAuthorization: Basic $encoded\n\n");
$answer = <$socket>;
close($socket);
print $answer;
1;
Users browsing this forum: No registered users and 98 guests