views:

68

answers:

2

I'm running an online shop and I'm trying to have the "purchase" (which is a form "post" action) post to two separate servers (one local and one remote) ... I think this might be impossible but I'm looking for a definitive answer.

+2  A: 

You could direct the HTTP POST to a "proxy" which immediately does the two separate posts you want (may seem a bit convoluted, wrt having the local server perform the remote post upon receiving the local post, but it has the advantage that you don't need to touch one bit in the servers' code -- each of them need have no knowledge about its "sibling" server also receiving the same POST). HTTP is always based on "one client, one server" per transaction, but proxy-like entities like this one may be used to relax this restriction.

Alex Martelli
+2  A: 

Assuming you are doing the post from a browser and assuming that the browser can run javascript, then you could definitely post the same form to more than one server. If using javascript on the browser is not a possibility, then you won't be able to post to more than one sever using just the browser.

TskTsk