Well, you can't do it with a Location redirect, I'm afraid. The only thing you can pass through that is a URL, which might happen to have some GET data embedded inside it. It's still not exactly clear what you are trying to do. The only way to send the information as a POST request is to connect to the web server, send the header information, including the length of your data, then send the data itself, and close the connection. That's basically what a web browser does, and what some of the above-mentioned modules can help with.

I'm going to make a wild stab here: you would like people to be able to click on a normal link (with GET information encoded) and have the server somehow redirect them to another script in which the information is sent only via POST and not in the new URL? If so, you can simulate that connection by having your script connect to the new website, deliver the data as POST, and dump the results back to the person browsing. The only other way would be to have your script output a page in which they could hit a submit button and do it themselves. But there is no way to force/trick a browser to send post information without user interaction (e.g. clicking on the submit button)


In reply to RE: Re: Passing POST parameters by turnstep
in thread Passing POST parameters by Anonymous Monk

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.