in reply to posting to a form to get results

This reply is mere a suggestion to monks that hit this node by supersearching, for I believe it's not relevant to your specific example.

Sometimes, the results of posting something with LWP, may look like nothing has happened/been posted. In this case, make sure there are no hidden fields that you missed (some BOFHs even create "random" values for hidden fields). Besides that, also check the use of cookie-stored session IDs (or other values stored in a cookie). Many sites use that too and disallow any posting without such a cookie. Annoying, but oh well, if a you can do something with your browser, you can do the same with LWP :) I, myself, always quite enjoy working around these attempts to ban scripts :)

If interested in the cookie stuff, see HTTP::Cookies.

--
b10m

Replies are listed 'Best First'.
2Re: posting to a form to get results
by jeffa (Bishop) on Dec 25, 2003 at 00:51 UTC

    Good advice. Another general tip is to use a common User Agent string, such as

    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    because some sites disallow access based on the User Agent string as well. This looks like a decent list of Agents. Search google for more.

    Also, start the ball rolling with WWW:Mechanize, if for no other reason than it handles cookies for you transparently. Just login "as usual" and you have a session.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)