[英]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. 如果远程网站将您重定向回自己的应用程序,则可以使用其GET或POST值。
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.