I have a script that is using LWP::UserAgent to parse a web page. I've used to script to parse web pages in the past it has worked fine. I'm currently trying to retrieve a web page that is generated using php. (ie www.webpage.com/webpage.php). The web page in question culls and displays information from a database. When browsing the page through IE, the top of the page (simple text), displays very quickly but then it takes some time for the information to be pulled from the database and displayed. There is a delay between when you see the top part of the page and when the rest of the page loads.
My question is this: When I try to retrieve the web page through perl, all the "text" information is displayed properly, but the information that is pulled from the database is not retrieved by the script. All that my script is doing, is grabbing the web page:
sub getURL
{
my($url, $thegoods,$givecookie,$savecookie,$redirect) = @_;
my $ua=new LWP::UserAgent;
my $request;
$request = new HTTP::Request('GET',$url);
my $response=$ua->request($request);
print $response->as_string();
}
My script runs and finishes very quickly. It takes much longer for the page to load in IE than for my script to run. It is almost as if the webpage is not retrieving the database information.
I know this questions vague, but does anybody have any idea why the information that is being pulled from the database is not being picked up by script?
Thanks