hhheng has asked for the wisdom of the Perl Monks concerning the following question:
After successfully sending the post request, it will turn to something like http://www.mydomain.com/payment.php. I'm trying to find the page content of payment.php, however, the above script will still get the page content of register.php. My question now is how to detect that the request turned to payment.php and get its content then?#!/usr/bin/perl use LWP 5.64; my %form; $form{"name"} = $name; $form{"email"} = $email; $form{"grade"} = $grade; my $res; my $url = "http://www.mydomain.com/register.php"; SIG{ALRM} = sub {print "timeout";}; eval{ alarm(30); $res = $ua->post($url, \%form); alarm(0); }; $page_content = $res->content if $res->is_success;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to find the url turned to
by almut (Canon) on Jun 06, 2010 at 05:42 UTC | |
by hhheng (Initiate) on Jun 07, 2010 at 02:34 UTC | |
|
Re: How to find the url turned to
by Khen1950fx (Canon) on Jun 06, 2010 at 09:17 UTC | |
by ww (Archbishop) on Jun 06, 2010 at 11:30 UTC | |
|
Re: How to find the url turned to
by ikegami (Patriarch) on Jun 06, 2010 at 06:29 UTC |