Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 26th, 2012  |  syntax: None  |  size: 0.38 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Perl WWW::Mechanize::Firefox POST() Implementation
  2. my $mech = WWW::Mechanize::Firefox->new();
  3. $mech->allow( javascript =>1);                  # enable javascript
  4.  
  5. # http
  6. $mech->get("http://www.example.com");
  7. my $c = $mech->content;
  8.        
  9. $mech->get('http://www.website.com');
  10. $mech->submit_form(
  11.       with_fields => {
  12.           user => 'me',
  13.           pass => 'secret',
  14.       }
  15. );