ASP-type website combined with dynamic network forum member method page 1/3

Source: Internet
Author: User

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.