How do I log in to a server where the API is not disclosed?

Asked 2 years ago, Updated 2 years ago, 22 views

I wonder how to log in to a server that does not have an open API For example, login.If I send id and pw as parameters in php file, how should I process it after that?

android

2022-09-21 23:06

1 Answers

If you don't have an API, do you mean you're logging in to a regular web page?

Web pages typically handle login based on cookie.

When the login process is finished using ID/PW, a cookie corresponding to the login token is dropped in the response header.

The server uses the cookies to identify whether the user is logged in or not.

In other words, if you emulate the process, you can log in.

After logging in, most of the simple sites are processed if you send the cookies that were answered in the next request header.

p.s: Large sites like Naver and Daum need to be a little more complicated.

See the link below for more information.

http://stackoverflow.com/questions/6432970/jsoup-posting-and-cookie


2022-09-21 23:06

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.