I tried over and over to find out how to login to a web site, but didn't succeed it. Can look at the code below ? It tries to log on to www.findmymate.com, but it only gets in return a web page that says that my browser doesn't support cookies and that the parameters haven't been sent correctly... #! /usr/bin/perl -w #----------------------------------------------------------- use LWP::UserAgent; use HTTP::Request::Common; use HTTP::Cookies; my $ua = LWP::UserAgent->new; $ua->cookie_jar(HTTP::Cookies->new); $ua->env_proxy; print $ua->request(POST "http://findmymate.com/cgi-bin/start_page.pl", [ "id"=>"DataEntryForm", "Username" => "blue_eyed", # text "Password" => "perl-lwp", # password "frompage" => "soul_mate_search.cgi", #hidden "option"=>"1", ], Referer => "http://findmymate.com/cgi-bin/start_page.pl", )->as_string; #it HAS to DO be something wrong with transmiting the login parameters $url="http://findmymate.com/cgi-bin/start_page.pl"; $req = HTTP::Request->new(GET => "$url"); # send request $res = $ua->request($req, "test.html"); #check it out with "lynx test.html" if ($res->is_success) { print "Ok. It works until here"; } #----------------------------------------------------------- -- Nick... ____________________________________________________________________________ Go to my main website http://terra.vl.ro/nick/ and find out more about me. I am seeking a job ! See http://terra.vl.ro/nick/resume.html to read about my skills and experience. MAY ALL OUR CHOICES BE GOOD ONES ! _____________________________________________________________________________
