Andy, Can you tell me how mech-dump works? I'm trying to post a reply to a friends forum. I get the page like this
get("http://user:passwd\@www.somesite.com/subdir/_vti_bin/shtml.exe/po +st.htm?474")
I checked response() and this works fine. I get the form and fill in the field like this.
$w->form_number(1); $w->field('Comments', 'woo-hoo');
Again, this works fine. The button to post the reply isn't named so I do this.
$w->submit_form();
Then I check the response
my $r = $w->response(); print 'error_as_HTML: '.$r->error_as_HTML."\n";
and get a "401 Authorization Required" error.

I think the problem is that the ?474 in the url is a dynamic number assigned by the shtml code. That's one thing I have NO idea how to automate. I don't know the logic on how Microsoft generates that number or on how I can make the post.

Do you have any idea? Or can you point me in the right direction? I've given up.

Thanks,
monktim


In reply to Re: Re: Re: Re: Redirecting Forms with WWW::Mechanize by Anonymous Monk
in thread Redirecting Forms with WWW::Mechanize by Ovid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.