如何 ?表单过帐到多个位置 [英] How To ? Form Post to Multiple Locations

查看:89
本文介绍了如何 ?表单过帐到多个位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要张贴到多个脚本的表格.我该怎么做最简单的方法?

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

我知道可以使用Javascript,Curl或Snoopy类完成此操作,但实际上这是最简单,最好的方法.

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.

其中一个脚本发送电子邮件,它是一个php文件,另一个则托管在其他位置.

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

需要在两个脚本上收集数据.

Need to collect data on both scripts.

推荐答案

最好的方法是首先将表单提交到本地脚本,然后使用CURL将收到的(过滤后的)数据发布到远程脚本.然后只需注意响应即可.

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.

这篇关于如何 ?表单过帐到多个位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆