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

Categories

0 votes
384 views
in Technique[技术] by (71.8m points)

php - How To ? Form Post to Multiple Locations

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

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

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...