I’m integrating Constant Contact with an email form.
The API uses REST. An xml file is outputted to send the information.
The problem is that it needs to redirect to a thank you page at the end, and since a header is already sent with the previous data tranfer, this isn’t permitted.
What is a good strategy for managing this scenario.
It would be 2 separate http requests. The first one from the remote server to post the xml, then process the data on your side and then do the redirect to the second http destination. As long as you don’t output anything to the browser, you can use the php header() function to do the redirect.