简体   繁体   English

如何将信息从本地主机发送到我的Web应用程序?

[英]How to send infomation from localhost to my webapp?

So in my JS web app, I open a popup window to an external website, which I cannot access because of security. 因此,在我的JS Web应用程序中,我打开了一个外部网站的弹出窗口,出于安全原因,我无法访问该窗口。 The site redirects to my localhost when the user is done interacting, and it now contains info in the header. 用户完成交互后,该站点将重定向到我的本地主机,现在它在标头中包含信息。 (http://localhost/authkey=12345). (http:// localhost / authkey = 12345)。 Is there any way I can detect server side when I get a connection to localhost and transmit this information back to my app? 当我连接到localhost并将信息传递回我的应用程序时,有什么方法可以检测服务器端?

If the remote website is redirecting you back to your own app, you can use its GET or POST values. 如果远程网站将您重定向回自己的应用程序,则可以使用其GETPOST值。

You mentioned "server side" - in case you want to use server-side scripting, you have to learn some languages like PHP or ASP. 您提到了“服务器端” -如果要使用服务器端脚本,则必须学习一些语言,例如PHP或ASP。

If you only want to deal with basic the basic things, you can still use Javascript. 如果您只想处理基本的基本知识,您仍然可以使用Javascript。

I know about two libraries that can help you in parsing URLs: 我知道有两个可以帮助您解析URL的库:

If the remote website provides you POST information too, you will have to use server-side scripting to handle this data. 如果远程网站也提供了POST信息,则您将必须使用服务器端脚本来处理此数据。

Just to know: 想知道:

GET - the information in your URL, such as authkey=12345 . GET -URL中的信息,例如authkey=12345

POST - Invisible to the client. POST -隐形给客户端。

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

相关问题 如何使用Node.js将WebApp本地化 - How to localhost a webapp with nodejs 如何从服务器数据创建“添加到日历”iCal链接(.ics文件)并将其发送回我的webApp? - How to create an “add to calendar” iCal link (.ics file) from server data and send it back to my webApp? 如何将文件从本地主机发送到网站 - How to send a file from localhost to website 当 multer 是 localhost 时,如何将文件从 multer 发送到托管在服务器上的网站文件夹 - How can i send a file from multer to my website folder which is hosted on a server while multer is localhost SuiteScript:如何使用自定义数据字段从数据库加载信息 - SuiteScript: how to have a custom data field to load infomation from database 如何使用localhost在浏览器中运行Webapp? - How to run a webapp in browser using localhost? 从服务器向webapp发送和接收SMS - send and receive SMS from server to webapp 如何将数据从chrome扩展发送到localhost? - How can i send data from chrome extension to localhost? 如何使用JSONP将数据从本地主机发送到domain.com - How to send data using JSONP from localhost to domain.com 你如何从本地主机发送跨源请求? - How do you send a cross origin request from localhost?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM