简体   繁体   English

从一个网页重定向到另外两个网页

[英]redirect from one webpage to two other webpages

Actually I am using API to send SMS from a webpage from my site. 实际上我使用API​​从我的网站发送来自网页的短信。 The SMS gateway site just gives the feedback of delivery, doesn't return to my website. SMS网关站点只提供交付反馈,不返回我的网站。 After sending SMS, I need to send emails & update database. 发送短信后,我需要发送电子邮件和更新数据库。 I know JavaScript & php. 我知道JavaScript和PHP。

I don't want to depend on SMS gateways redirection, is there a way to go to their webpage & return back without their involvement? 我不想依赖短信网关重定向,有没有办法去他们的网页并在没有他们参与的情况下返回?

使用cURL从您的服务器调用API并保持客户端体验完全在您的控制之下 - 这样您不仅可以重定向,AJAX或任何您想要的任何内容,您还可以在客户端滥用您的页面时执行一些低空飞行的子弹。

From your question, I assume that you are transferring control to the SMS gateway site by redirecting the browser to it, then no. 从您的问题,我假设您通过将浏览器重定向到它来转移控制到SMS网关站点,然后没有。 Once the browser leaves your site and loads the gateway site, you no longer have the ability to run any code. 浏览器离开您的站点并加载网关站点后,您将无法再运行任何代码。

If you are, instead, invoking the SMS gateway API via server or client side code, then yes. 相反,如果您是通过服务器或客户端代码调用SMS网关API,那么是。 Once the HTTP request that invokes the API is complete, you will be able to perform a redirect as you normally would. 一旦调用API的HTTP请求完成,您就可以像往常一样执行重定向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM