gube has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
I have to extract content in the web page by post method. If 'http' site it's working. In 'https' site. I am getting error. please see the below code and tell me the changes.
Thanks in advace
use LWP::UserAgent; use HTTP::Request; $username = "xxx"; $password = "xxx"; $url = 'https://adwords.google.com/select/TrafficEstimatorSandbox'; $url_login = 'login.userid='.$username.'&login.password='.$password; my $ua = LWP::UserAgent->new; my $request = HTTP::Request->new(POST => $url); $request->content_type("application/x-www-form-urlencoded"); $request->content($url_login); my $response = $ua->request($request); if ($response->is_success()) { print $response->content; } else { print $response->status_line, " <URL:$url>\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to extract page content in https site?
by jbrugger (Parson) on Jul 15, 2005 at 07:15 UTC | |
|
Re: How to extract page content in https site?
by davorg (Chancellor) on Jul 15, 2005 at 08:21 UTC | |
|
Re: How to extract page content in https site?
by gellyfish (Monsignor) on Jul 15, 2005 at 07:54 UTC | |
| |
|
Re: How to extract page content in https site?
by tphyahoo (Vicar) on Jul 15, 2005 at 13:40 UTC |