Problem using Http::Request::Form

2005-11-09 Thread varun bhardwaj
 Hi Everyone

I am using the perl script in php but at the time of
calling of this script it gives error at
http::request::form.
Please if anyone could help me in solving the problem.
I am unable to understand why it is crashing at this
point.

Thanks.

=
#!/usr/bin/perl -w

use strict;
use URI::URL;
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Request::Common;
use HTTP::Request::Form;
use HTTP::Cookies;
use HTML::TreeBuilder 3.0;
use DBI;

my ($db_table, $db_user, $db_pass) = (tab, dbu,
pass);


my $url = https://abc.def;;

my $ua = new LWP::UserAgent;
push @{ $ua-requests_redirectable }, 'POST';
$ua-cookie_jar(new HTTP::Cookies(file =
./cookies.txt));

my $req = new HTTP::Request(GET $url);
my $res = $ua-request($req);


my $tree = new HTML::TreeBuilder;
$tree-parse($res-content);
$tree-eof();

my @forms = $tree-find_by_tag_name('FORM');
if([EMAIL PROTECTED]) {
die No forms found;
}

my $form = new HTTP::Request::Form($forms[0], $url);
$form-field({actionForm.username}, user);
$form-field({actionForm.password}, password);

$res = $ua-request($form-press());



__ 
Enjoy this Diwali with Y! India Click here 
http://in.promos.yahoo.com/fabmall/index.html
___
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Problem using Http::Request::Form

2005-11-09 Thread Charles K. Clarkson
varun bhardwaj  wrote:
:  Hi Everyone
: 
: I am using the perl script in php but at the time of
: calling of this script it gives error at
: http::request::form.

What is the error?

HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328

. . . And Liberty and Justice for all (heterosexuals).

___
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs