I recently had the same problem and solved it with code very similar to what I've pasted below.
Best of luck
------------------------------------------
#! c:\perl\bin\perl.exe $| = 1; use LWP::Simple; use HTTP::Request; use HTTP::Request::Common; use HTTP::Response; use LWP::UserAgent; use Authen::NTLM; use CGI::Carp qw(fatalsToBrowser); use Net::HTTP; use HTTP::Headers; use Mail::Sendmail; print "Content-type: text/html\n\n"; #_____________________________________________________________________ +__________ sub Giddyup ($){ my($content) = @_; ntlm_reset(); ntlm_domain(''); ntlm_user(YOURUSERNAME); ntlm_password(YOURPASSWD); my $Type1MSG = ntlm(''); #__________First connection attempt_________ #make a user agent my $ua = LWP::UserAgent->new( keep_alive => 1, timeout => 30, ); #make a header header object my $header1 = HTTP::Headers->new; $header1->authorization('NTLM '. $Type1MSG); $header1->content_type('application/x-www-form-urlencoded'); #Make a request and response object my $req1 = HTTP::Request->new(POST => 'http://www.yoursite.whatev +er', $header1, $content); my $resp1 = $ua->request($req1); my $code1 = $resp1 -> code; my $Type2MSG = $resp1 -> www_authenticate; $Type2MSG =~ s/NTLM //; #__________Second connection attempt_________ my $Type3MSG = ntlm($Type2MSG); #make a header header object my $header2 = HTTP::Headers->new; $header2->authorization('NTLM '. $Type3MSG); $header2->content_type('application/x-www-form-urlencoded'); #Make a request and response object my $req2 = HTTP::Request->new(POST => 'http://www.yoursite.whatev +er', $header2, $content); my $resp2 = $ua->request($req2); $code2 = $resp2 -> code; if ($code2 == 200){ print "<p>NTLM Connection established (Code:$code2)... req +uest sent</p>"; } } #_____________________________________________________________________ +__________ #CODE STARTS HERE print "<html><head><title>Enter Title Here</title></head><body>"; my $content = 'Field1=' . $Field1 . 'Field2=' . $Field2 . 'Field3=' . +$Field3 . 'Field4=' . $Field4 . 'Field5=' . $Field5; print "The content string contains:\n $content\n"; Giddyup($content);

In reply to Re: NTLM http authen - basic authen by Dr. Who
in thread NTLM http authen - basic authen by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.