If a personal website has a Member registration module + a mobile network forum, it is not easy to integrate the website with the mobile network forum system to synchronize and update user information between different Web systems, and log on to the website, although Alibaba Cloud has provided a detailed "Api interface developer guide for the Alibaba Cloud dynamic network forum system", cainiao like me may be confused at half past one, sweating. Unwilling to do so, I did some research on functions such as login and verification, and then tested them. Then I finally achieved a small success. cainiao also had a cainiao solution, haha.
I. website file structure
Wwwroot
Restore index. asp
┝ CheckUserLogin. asp
Bbs/
Ii. Integration Principle
It is not difficult to implement synchronous updates. The main problem of integration is that it is difficult to log on synchronously. Therefore, we will focus on discussing how to implement synchronous logon. My method is to integrate the main site User table into the dynamic network user table Dv_User (eliminating the trouble of updating the two databases in the future), you can add fields in Dv_User as needed, and for bbs/login. modify asp and bbs/inc/Dv_ClsMain.asp. Send the form to bbs/login during logon. asp for verification. The main site determines whether the logon is successful based on the information recorded in the Session after the successful logon of the dynamic network and obtains user information.
3. Add and modify files
1. index. asp code:
<Html>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> integration of personal websites and dynamic networks (www.mzwu.com) </title>
</Head>
<Body>
<! -- # Include file = "CheckUserLogin. asp" -->
<%
If CheckUserLogin Then
Response. write ("<a href =" "bbs/logout. asp? Back = 1 ""> log out </a> <p> </p> ")
Response. write ("username:" & Request. Cookies ("username") & "<br> ")
Response. write ("Gender:" & Request. Cookies ("sex") & "<br> ")
Response. write ("registration time:" & Request. Cookies ("joindate") & "<br> ")
Response. write ("Last Logon:" & Request. Cookies ("lastlogin") & "<br> ")
Response. write ("Logon times:" & Request. Cookies ("userlogins") & "<br> ")
Response. write ("browser type:" & Request. Cookies ("browser") & "<br> ")
Response. write ("browser version:" & Request. Cookies ("version") & "<br> ")
Response. write ("Operating System:" & Request. Cookies ("platform") & "<br> ")
Else
%>
<Form id = "form1" name = "form1" method = "post" action = "bbs/login. asp? Action = chk & back = 1 ">
User name:
<Input name = "username" type = "text" id = "username" size = "10"/>
<Br/>
Password:
<Input name = "password" type = "password" id = "password" size = "10"/>
<Input type = "submit" name = "Submit" value = "Logon"/>
</Form>
<%
End if
%>
<P> </p> <a href = "bbs/"> enter the Forum </a>
</Body>
</Html>