How can I do that?

There is a Client, Server1, Server2. Client POST sends a request to Server1. The server1 processes the variables from POST and, based on the processed data, makes a request for Srever2. After receiving a response from Server2, Server1 finishes processing the request from the Client and gives it a response page. Those. Server1 must respond to the Client ONLY after receiving a response from Server2 of the request from Server1. Please provide some sample code.

Thank you in advance!

    1 answer 1

    I can advise the scheme how to do it.

    1. The client sent the data for example through ajax ...
    2. Here server1 processed the data and sent it to another server2 using cURL and waits for something to come from server2 and as soon as something arrives, server1 sends the data back to the client.
    • IMHO the most normal solution - Zowie