The site does not have an interface reserved. Creating a client for this type of Web site is a post and get request that simulates a Web page, and then gets the data returned by the server.
1. Use HttpWatch to analyze the contents and URLs of the Get and post requests sent by the browser when doing the client. The main content of the analysis is the analysis of post requests. Post mainly includes headers, cookies, and post data. Need to know the meaning of the parameter key-value pairs in post data, how to set the cookie value in the header and how to get cookies.
2, do not know because of the YII architecture or other reasons, this site can use the session ID to maintain the login status of this reply. That is, after the login verification passed, the next time the request is sent using the newly returned session ID after authentication login to send the request, the server side or is not logged on. So you can only use cookies one way. Using HttpWatch, you can clearly know the cookie name and obtain a cookie from the returned content by using the cookie name.
3. A httpclient can only be used to send a GET or POST request. When sending a GET or POST request, you need to set the cookie portion of the header. The contents of this section are mainly Phpsessid and cookies. The first time you log in to get a cookie, the value of the cookie in the header of this visit is PHPSESSID before the cookie. The cookie value in the header section is changed to a cookie before using the cookie to access the website later, Phpsessid.
Make an Android client for the YII architecture website