我怎样才能同时发布到多个网址? [英] How can I POST to multiple urls at the same time?

查看:133
本文介绍了我怎样才能同时发布到多个网址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的网站使用EE进行托管。我的任务是添加到我们的联系我们表单,以便将其发布到外部销售线索生成系统(hubspot)。



我们收到了要发布的网址当我终于找到问题表单的html时,我注意到它已经指向另一个销售主管系统。我不想删除这个网址。是否有可能同时做两个帖子?

 < form action =https://www.salesforce。 com / servlet / servlet.WebToLead?encoding = UTF-8method =POST


http://yoursite.yourportal.hubspot.com/?app=leaddirector&FormName= X


解决方案

。使用XMLHTTP对象或JQuery.post();使用不同的网址和相同的数据。只需发送多个请求。或者,您可以向您的服务器发送一个请求,PHP可以将其发送到其他页面以及其他服务器,从而避免使用JavaScript制定的同源策略。


Our website is hosted using EE. I've been tasked to add to our "Contact us" form so that it posts to an external sales lead generation system (hubspot)

We were given an URL to post to, and when I finally found the html for the form in question I noticed that it is already pointing to another sales lead system. I don't want to remove this URL. Is it possible to do two posts at the same time?

<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST" 


http://yoursite.yourportal.hubspot.com/?app=leaddirector&FormName=X

解决方案

You can't do that with a single request. Use XMLHTTP objects or JQuery.post(); with different URL's and the same data. Simply send multiple requests. Alternatively, you could send one request to your server, where PHP can send it onwards to other pages, as well as other servers, evading the same-origin policy javascript has.

这篇关于我怎样才能同时发布到多个网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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