Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have a form which I need to POST to multiple scripts. How can I do this the simplest way?

I know it could be done with Javascript, Curl or Snoopy class, but really which is the most simplest and best way to do this.

One of the scripts sends email and it's a php file, the other is hosted elsewhere.

Need to collect data on both scripts.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
356 views
Welcome To Ask or Share your Answers For Others

1 Answer

The best way to go about it would be to first submit the form to your local script, then use CURL to POST the (filtered) data that was received to the remote script. Then just watch for the response.

Then simply send the email and process the response from the remote script in your local one.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...