----- Original Message -----
From: Cgreenhill <[EMAIL PROTECTED]>
To: J Kalita <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, May 26, 2000 10:00 AM
Subject: Re: A question about submitting forms to an IIS/ASP sitee
You need to pick up the "sessid" value every time you run a search
becauses it's dynamic. So, get the form page and parse out the
sessid first, then build a string from it like this -
use HTTP::Response;
use HTTP::Request;
use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Request::Common;
$search = "Applied+Cryptography";
$cookie_jar = HTTP::Cookies->new(file=>"d:\\cookies.dat");
$ua = LWP::UserAgent->new();
$ua->agent("Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
$ua->timeout(600);
$request =
HTTP::Request->new(GET=>"http://www.varsitybooks.com/search.asp");
$cookie_jar->add_cookie_header($request);
$response = $ua->request($request);
$cookie_jar->extract_cookies($response);
$content = $response->content();
$content =~ s/[\r\n]//g;
if ($content =~ /name="sessid" value="/ ) {
$sessid = $';
$sessid =~ s/".+$//;
}
print $sessid."\n";
$url =
"http://www.varsitybooks.com/search.asp?sessid=".$sessid."&SearchBy=title&se
arch=".$search."&GO.x=25&GO.y=11;
$request = HTTP::Request->new(GET=>$url);
$cookie_jar->add_cookie_header($request);
$response = $ua->request($request);
$cookie_jar->extract_cookies($response);
$content = $response->content();
-Chris
> ----- Original Message -----
> From: J Kalita <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, May 25, 2000 2:58 PM
> Subject: A question about submitting forms to an IIS/ASP sitee
>
>
>
> Hi everyone!
>
> I would love to hear from anyone regarding how to solve the problem
> I am facing.
>
> I am trying to make a call to a form at a site varsityBooks.com
> using the libwww package.
> The downloaded the source for the form that I want to submit is given
below.
> It's simple except it hs a "sessid" field with a huge hex value.
> I kept the value as it is.
>