在某个操作完成后,将数据发送到脚本的最简单方法是什么?

问题描述:

I am building a script that will handle data that is sent to it. This data will be in the form of id=xyz and key=j9ofi902f89djs8if with id and key particular to each script that is sending the data to my script. I am trying to think of a fool proof way that would make it exceedingly simple for anyone who wants to send this data to my script to do it.

My handling script will be built in PHP. The scripts sending the data to it will not be on the same domain. The data needs to be sent after a certain button is pressed the sending page and the form is verified that it has no errors. I would like to be able to control the process of sending and receiving all myself, but I cannot think of a way to do that. Is there a way to do this that would work across the board?

If not, what would be the best way to make it so that each different sending script that uses their own language, and method can easily send it to my script. Would a POST or a GET or something else be better. I want to make it so that they can send the data in the middle of their handling the form and on the script proceed to do other things after they send me the data. Any ideas?

我正在构建一个脚本来处理发送给它的数据。 此数据将采用 id = xyz code>和 key = j9ofi902f89djs8if code>的形式,其中 id code>和 key code>特定于每个 将数据发送到我的脚本的脚本。 我试图想出一个简单的方法,这对于那些想要将这些数据发送到我的脚本的人来说非常简单。 p>

我的处理脚本将用PHP构建。 向其发送数据的脚本不在同一个域中。 在按下发送页面的某个按钮后需要发送数据,并确认表单没有错误。 我希望能够控制自己发送和接收的过程,但我想不出办法做到这一点。 有没有办法做到这一点可以全面运作? p>

如果没有,最好的方法是使每个不同的发送脚本使用他们自己的语言,以及 方法可以轻松地将其发送到我的脚本。 POST或GET或其他什么会更好。 我想这样做,以便他们可以在处理表单的过程中发送数据,并在脚本发送数据后继续做其他事情。 有什么想法吗? p> div>

Use AJAX, send the data through AJAX without a page refresh or a page redirect that is done with the post option. I think it is the best solution for your application.

Ajax tutorial.