Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Entering HTTPS web page

Thread Tools

Entering HTTPS web page

Posts: n/a

I am trying to enter a HTTPS site -- Google Answers, for example. I
found this simple Google Answers client at Google Answers

Here's the code:

++++++++++++ Begin Code ++++++++++++

use LWP;
use HTTP::Request::Common;
use HTTP::Cookies;

$email='(E-Mail Removed)';

$ua = LWP::UserAgent->new;

'', ['email'=>$email,
password=>$pass, 'submit'=>'Login']);
if ($req->content=~ /Invalid login/){
print "invalid login!\n";
print "welcome to google answers \n";
print $req->content;
$req->content=~/<td> Current Earnings \(what you will be paid\)
for Answering Questions: <\/td> <td width="1%">
$req->content=~/<td> Current Balance \(what you will be charged\)
for Asked Questions: <\/td> <td width="1%"> \$([0-9]+(?:.[0-9]+)?)/;
print "Will be paid: $ear \nWill be charged: $char\n";

++++++++++++ End Code ++++++++++++

Every time I run the code, I get a "400 URL missing" error.

Any help would be appreciated.

Reply With Quote
Dan Wilga
Posts: n/a
In article <(E-Mail Removed)> , Removed) (Mahaan) wrote:

> $req=$ua->request(POST
> '', ['email'=>$email,
> password=>$pass, 'submit'=>'Login']);

Try using 'POST' instead of POST, and follow it with a comma.

Dan Wilga (E-Mail Removed)
** Remove the -MUNGE in my address to reply **
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
server side redirect https => https NOT working Axel ASP General 8 04-27-2009 02:02 AM
https authentication & storing https page in string Naveen Dhanuka Ruby 1 09-19-2007 02:05 PM
open-uri and HTTPS, or net/https with a redirect jotto Ruby 4 10-02-2006 07:26 AM
Need solution for entering email address to view a page Larry Webb HTML 0 11-17-2005 10:39 PM
Entering Info on One Page, used in 2nd Page Tobe ASP .Net 1 07-08-2003 02:22 AM