…d„^…d wrote: > <code>
use HTTP::Cookies; > my $address='http://bbs.abc.com/login'; > my $req = new HTTP::Request 'POST',"$address"; > $req->content_type('application/x-www-form-urlencoded'); > $req->content('username=abc&password=cba&submit=Login'); > $ua = LWP::UserAgent->new; > $ua->agent("Robot/abc"); # ::Netscape class part is optional my $cookie_jar = HTTP::Cookies::Netscape->new( 'File' => 'cookies.txt', 'AutoSave' => 1)); $ua->cookie_jar($cookie_jar); > my $res = $ua->request($req); > print $res->as_string; > </code> > > OK,here I can login the bbs,but I can't operate further by single > 'Get'/'Post' method.(Authorization Problem) > So,how to use the cookie I got? That should get you started. _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
