develooper Front page | perl.libwww | Postings from February 2001

post woes

Chris Martino
February 26, 2001 12:13
post woes
Message ID:

I'm writing a script to login to surepay and access some data.  I'm trying
to reuse some other code that works successfully for other websites, but
it isn't working for this site.

Here's what I'm using:

--- BEGIN ---

#!/usr/bin/perl -w
use HTTP::Request::Common;
use LWP::UserAgent;
use HTTP::Cookies;

$ua = LWP::UserAgent->new();
$ua->agent("Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");

$response = $ua->request(POST "",
        ['globalUser' => "false",
        'loginerror' => "true",
        'MerchantIDIn' => "id",
        'PasswordIn' => "pass",
        'UserIDIn' => "Admin%20Login"]);
$ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt", autosave =>

print $response->as_string;

--- END ---

Here's the response I get back:

--- BEGIN ---

chris@black ~/scripts > ./
HTTP/1.1 200 OK
Date: Mon, 26 Feb 2001 20:11:04 GMT
Server: Netscape-Enterprise/3.6 SP3
Content-Type: text/html
Client-Date: Mon, 26 Feb 2001 20:18:45 GMT
Client-SSL-Cert-Issuer: /C=US/ incorp. by ref. (limits liab.)/OU=(c) 1999 Limited/ Secure Server Certification Authority
Client-SSL-Cert-Subject: /C=US/ST=California/L=Redwood City/O=First Data
Corporation/OU=Commerce Equipment Operation/
Client-SSL-Cipher: DES-CBC3-SHA
Client-SSL-Warning: Peer certificate not verified
Page-Completion-Status: Normal
Page-Completion-Status: Normal

        <form name="the_form" action="error.cfm" method="post">

                        <input type="hidden" name="message" value="Login
incorrect.  Please re-enter your user ID and password.<br><br>If your
browser does not accept cookies please reconfigure it so the Cookies can
be turned on in Netscape by going to Edit->Preferences and in Internet
Explorer by going to View->Internet Options.">
                        <input type="hidden" name="cfid" value="71620">
                        <input type="hidden" name="cftoken" value="5145865">
                        <input type="hidden" name="deletecookie" value="true">
                        <input type="hidden" name="loginerror" value="true">


--- END ---

I know this is a pretty specific problem, but perhaps I am overlookinf
something.  That's where all you guys come in. :)

C Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About