CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Fetch HTML code after redirect,

 



neTTanel
New User

Sep 16, 2009, 7:00 AM

Post #1 of 3 (2150 views)
Fetch HTML code after redirect, Can't Post

Hi All,

I try to fetch HTML code of a website using LWP, till now every website i needed, my script was perfect for it. Now i am encounter with a problem: Mad

the page i need to fetch is behind a page that said your request is in progress (and the HTML i get is of this page).
But i need the HTML of the redirect page.
when i try manually to send the redirect page it doesn't bring to the correct page!!!Pirate (it bring the HTML of the search page of this web site).

action I take:
1. copy the exact header (with the referer) to HTTP::Header and that run the call_http....
2. Tried to play with the jsession (nothing).
3. Set the cookie via HTTP::Cookies.

Nothing !!!!!!!!
if there a need to more info just say.
Any suggestion will be more than welcome.

Thanks.


1arryb
User

Sep 16, 2009, 8:31 AM

Post #2 of 3 (2146 views)
Re: [neTTanel] Fetch HTML code after redirect, [In reply to] Can't Post

Hi neTTanel,

A code snippet containing a sample url that illustrates this problem would be helpful.

Cheers,

Larry


neTTanel
New User

Sep 16, 2009, 9:04 PM

Post #3 of 3 (2122 views)
Re: [1arryb] Fetch HTML code after redirect, [In reply to] Can't Post


In Reply To
Hi neTTanel,

A code snippet containing a sample url that illustrates this problem would be helpful.

Cheers,

Larry


Here ya go.

The main program (part of):

# first call for authentication
my $url = $self->{RequestParams}->{url};
$self->{RequestParams}->{url} = "some url for authen";
($errorCode,$errorData) = $self->execHTTPRequest;

$self->{RequestParams}->{url} = "some url for the search page";
$self->{RequestParams}->{cgiMethod} = 'POST';
($errorCode,$errorData) = $self->execHTTPRequest;

## second call - search
$self->{RequestParams}->{url} = "url with cgi parameters (the HTML i need is of this page";
$self->{RequestParams}->{cgiMethod} = 'GET';
($errorCode,$errorData) = $self->execHTTPRequest;


SCRIPT OF THE "BROWSER" PROGRAM:

if ($method eq 'GET') {
$reqObj = new HTTP::Request($method,$urlObj,$hdrObj);
} else {
$reqObj = new HTTP::Request($method,$urlObj,$hdrObj,$cgi_param);
}

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives