Reputation: 15006
I'm building some efficiency tools for a crappy website. This website uses http-posts for some of it's navigation. What I need is that when a user runs a script on an url (redirect.php), I want the client to post to an url on an external site, with some variables.
I know I could do this with javascript, creating a form and posting to it, but I would prefer doing it with php if possible. It needs to be the client that get's forwarded, because they are authenticated with the website that I'm sending them to.
Upvotes: 0
Views: 41
Reputation: 522024
The only way to make a browser send a POST request anywhere is by making a form and submitting it, or doing equivalent trickery using Javascript. You cannot make a browser issue a POST request in response to a redirect response. There are specifications for response codes which allow "POST redirects", but no current browser implements them.
Upvotes: 2