简体   繁体   中英

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. The site redirects to my localhost when the user is done interacting, and it now contains info in the header. (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?

If the remote website is redirecting you back to your own app, you can use its GET or POST values.

You mentioned "server side" - in case you want to use server-side scripting, you have to learn some languages like PHP or ASP.

If you only want to deal with basic the basic things, you can still use Javascript.

I know about two libraries that can help you in parsing URLs:

If the remote website provides you POST information too, you will have to use server-side scripting to handle this data.

Just to know:

GET - the information in your URL, such as authkey=12345 .

POST - Invisible to the client.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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