brian123 has asked for the wisdom of the Perl Monks concerning the following question:
Thank you for your help.#!/usr/bin/perl -w use LWP::UserAgent; use HTTP::Request::Common; # my $ua = LWP::UserAgent->new; $ua = new LWP::UserAgent(keep_alive=>1,agent=>'Mozilla/5.0 (Windows; U +; Windows NT 5.1; en-US; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11'); # Create a request my $response = $ua->post('http://www.sanmateocountytaxcollector.org/SM +CWPS/SearchParcels',{parcelNumber=>'048022230',searchType=>'parcel',l +istFirst=>'S',bkList=>'SS',addressTypeDsp=>'',addressType=>'',actionT +ype=>'search',nextPage=>'./pages/parcelList.jsp',parcel1=>'048',parce +l2=>'022',parcel3=>'230'}); my $u = $response->header('location') or die "missing location: ", $r +esponse->as_string; print "redirecting to $u\n"; # $r = $ua->get($u); $r = $ua->simple_request(GET $u); print $r->as_string;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help With Post-Redirect-Get Problem
by ikegami (Patriarch) on Dec 09, 2010 at 05:21 UTC | |
by brian123 (Novice) on Dec 09, 2010 at 05:34 UTC | |
by ikegami (Patriarch) on Dec 09, 2010 at 06:18 UTC | |
by brian123 (Novice) on Dec 09, 2010 at 06:26 UTC |