If a personal website has a member registration module + Dingwang forum, then it is not easy to integrate the website with the Dingwang forum system to realize the synchronization update, login and other operations of user information between different web systems. Although Dingwang has provided a detailed "Dingwang Forum System Api Interface Developer Guide", novices like me will be unable to understand it for a while. Unwilling to give up, after studying and testing its login, verification and other functions, it finally made some achievements. Novice also has a newbie's way, haha.
1. Website file structure
wwwroot
┝index.asp
┝CheckUserLogin.asp
┕bbs/
2. Integration principle
It is not difficult to implement synchronous updates. The main problem of integration is the difficulty of synchronous login, so our focus will be on discussing how to implement synchronous login. My method is to integrate the main website user table into the Dv_User user table (eliminate the trouble of updating the two libraries in the future). You can add fields to Dv_User as needed, and make appropriate modifications to bbs/login.asp and bbs/inc/Dv_ClsMain.asp; when logging in, send the form to bbs/login.asp for verification; the main website judges whether the login is successful based on the information recorded in the Session after the login in the Dynamic Network is successful, and obtains user information.
3. Add new modified files
1.index.aspcode:
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>
<title>Integration of personal websites and dynamic networks (www.mzwu.com)</title>
</head>
<body>
<!--#includefile="CheckUserLogin.asp"-->
<%
IfCheckUserLoginThen
Response.write("<ahref=""bbs/logout.asp?back=1"">Login</a><p></p>")
Response.write("Username:"&Request.Cookies("username")&"<br>")
Response.write("Gender:"&Request.Cookies("sex")&"<br>")
Response.write("Register time:"&Request.Cookies("joindate")&"<br>")
Response.write("Lastlogin:"&Request.Cookies("lastlogin")&"<br>")
Response.write("Logins:"&Request.Cookies("userlogins")&"<br>")
Response.write("Browser Type:"&Request.Cookies("browser")&"<br>")
Response.write("Browser Version:"&Request.Cookies("version")&"<br>")
Response.write("OS:"&Request.Cookies("platform")&"<br>")
Else
%>
<formid="form1"name="form1"method="post"action="bbs/login.asp?action=chk&back=1">
username:
<inputname="username"type="text"id="username"size="10"/>
<br/>