Hello tony You gave me en grat answer on how to post but now i got another problem I post alright using this code:
use LWP::UserAgent; $url="http://www.google.com.br/search?q=$que&hl=pt&lr=&ie=UTF-8&oe=UTF-8&sta rt=10&sa=N"; $age="Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)"; my $lwp = LWP::UserAgent->new( agent => $age, timeout => 25 ); $page = $lwp->request(HTTP::Request->new(POST => $url)); $auxlin=$page->as_string; open (AR,">g.txt"); print AR $auxlin; close(AR); But the server ansers me saiing tha POST must have a content_lenght clause in their headindg , and i dont know how to insert that in my header can you please help me? Thanks in advance > > ----- Original Message ----- > From: "Tony" <[EMAIL PROTECTED]> > To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Saturday, September 14, 2002 8:01 PM > Subject: Re: HOW TO POST > > > > If you want to post, use the LWP::UserAgent mod, > > > > use LWP::UserAgent; > > my $lwp = LWP::UserAgent->new( agent => 'Skully/1.0', timeout => 25 ); > > $url = http://www.domain.com/script.pl?this=this&that=that; > > $page = $lwp->request(HTTP::Request->new(POST => $url)); > > if ($page->code == 200) > > { > > print $page->content; > > } > > else > > { > > print $page->message . ' ' . $page->code; > > } > > > > TOny > > > > ----- Original Message ----- > > From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, September 11, 2002 4:40 AM > > Subject: HOW TO POST > > > > > > > Hi all > > > I know how to do a GET using LWP but how can i make a POST , How do i > send > > > the variable fields of the form. > > > Thank you all > > > > > > > > > > > > -- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]