I'm sending a post to an url, and after successfully sending the post, it will turn to another page, now how to find the another page url?
<code=perl>
#!/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;
</code>
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?