#!/usr/bin/env perl use strict; use WWW::Mechanize; # use LWP::Debug qw(+); $|++; my $username = 'USERNAMEHERE'; my $password = 'PASSWORDHERE'; $ENV{HTTPS_PKCS12_FILE} = 'FILE.pfx'; $ENV{HTTPS_PKCS12_PASSWORD} = 'CERTPASSWORD'; my $mech = WWW::Mechanize->new(); $mech->agent_alias('Windows IE 6'); # Authenticate $mech->get("https://www.example.org/xyz/,DanaInfo=999.33.1.10+"); $mech->get("https://www.example.org/xyz/isapi_pathnet.dll?Page=Login&Mode=Silent&UserID=" . $username . "&Password=" . $password . ",DanaInfo=999.33.1.10"); # Fetch results $mech->get("https://www.example.org/xyz/isapi_pathnet.dll?Page=HL7&Query=NewRequests,DanaInfo=999.33.1.10"); #Print results print $mech->content(); # Acknowledge results $mech->get("https://www.example.org/xyz/isapi_pathnet.dll?Page=HL7&ACK=Positive,DanaInfo=999.33.1.10"); # Log out $mech->get("https://www.example.org/xyz/isapi_pathnet.dll?Logout=Yes,DanaInfo=999.33.1.10");