smudged123 has asked for the wisdom of the Perl Monks concerning the following question:

I currently run an adult oriented website and was creating a script to autopost my sites updates to adult bookmarking sites.
I was creating a submission script for Fuddit.com and have been unable to get the script to login properly.
Take a glance at the code below if ya do care..

$mech->get("http://www.fuddit.com/login"); $mech->form_number(1); $mech->field( 'user_login' => $user); $mech->field( 'passwd_login' => $pass ); $mech->submit(); open(DEBUG,">>debug.html"); print DEBUG $mech->content(); close(DEBUG); system(PAUSE);

The debug printout continues to come back with debug.html as 0kb file which is confusing me, and if I request a login required page after that and then print debug, it gives me the login screen like it was never logged in.
Any help would be greatly appreciated, thanks!

Replies are listed 'Best First'.
Re: Perl WWW::Mechanize Form Submit Problem
by planetscape (Chancellor) on Feb 05, 2009 at 19:24 UTC
Re: Perl WWW::Mechanize Form Submit Problem
by jethro (Monsignor) on Feb 05, 2009 at 16:33 UTC

    An alternative to your Debug file would be

    use LWP::Debug '+';

    Also you might use a network sniffer (like tcpdump or wireshark) to compare the message exchange of your script with that of a normal web browser

      that feature doesn't work anymore