pduffy has asked for the wisdom of the Perl Monks concerning the following question:
(Ultimately ID1 will simply be a variable from another part of the program).use LWP::Simple; use LWP::UserAgent; use HTTP::Request::Common qw(POST); use URI::URL; $url = 'http://<website>/search/gene.asp?'; my $req = POST "$url", [ ID1 => 48852, ] $ua = new LWP::UserAgent; $result = $ua->request($req)->as_string; print $result;
Well, we get a cookie that changes each time the script is run.HTTP/1.1 302 (Found) Object moved Cache-Control: private Connection: Keep-Alive Date: Mon, 16 Jun 2003 10:40:33 GMT Location: genesrchresults.asp Server: Microsoft-IIS/5.0 Content-Length: 140 Content-Type: text/html Expires: Mon, 16 Jun 2003 09:00:33 GMT Client-Date: Mon, 16 Jun 2003 10:38:42 GMT Client-Peer: 63.108.93.17:80 Set-Cookie: ASPSESSIONIDCQTTATSB=JKFMHMDBGODCKACLGPAPBLMB; path=/ Title: Object moved <head><title>Object moved</title></head> <body><h1>Object Moved</h1>This object may be found <a HREF="genesrchr +esults.asp">here</a>.</body>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Accessing dynamic webpages
by merlyn (Sage) on Jun 16, 2003 at 11:46 UTC | |
|
Re: Accessing dynamic webpages
by gellyfish (Monsignor) on Jun 16, 2003 at 11:29 UTC | |
|
Re: Accessing dynamic webpages
by zby (Vicar) on Jun 16, 2003 at 11:07 UTC | |
by pduffy (Initiate) on Jun 17, 2003 at 08:33 UTC | |
by zby (Vicar) on Jun 17, 2003 at 09:11 UTC |