Agent Rat-Bastard (xenogram) wrote in php_dev,
Agent Rat-Bastard

POSTing and redirecting

I'm in a situation where I want to create a page that redirects to another site and posts as it does so, as if it were a form (the page needs to record acceptance in a database before the site-user hares off into the unknown, possibly not to return). Is there a way of manually setting these post values in php? header() just seems to apply to the page you're in. I can't rely on Javascript, and somehow sending the post variables to the other site and mirroring the result of the first page on my site would be commercially problematic. Help!

Thinking about this, there just doesn't seem to be a solution. Header sets HTTP header variables in the document that goes back to the user's browser, not the second server. POST variables would usually be provided by the user's browser to the second server, not by the first server. I just don't think that there's a way of doing this kind of redirection, but I may be wrong, it's not really my area.

Fascinating problem, would anybody like to comment?
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded