Using the @ character to implement level two domain Name System

Source: Internet
Author: User
Tags implement mdb database domain domain name
Level two domain name uses @ character to implement level two domain Name System


Domain names that do not support pan-resolution can also do a level two domain Name System

DNS.MDB Database structure:
This example uses only 3 fields, part of the omitted field to cooperate with the registration page can be arbitrarily added

ID (auto increment)
User (text)
Torul (text)
... ...


Default.asp page Content
----------------------------------------------------------------------------------
<%
Dim user
User=trim (Request ("user"))
If user= "" Then
%>
<script language= "VBScript" >
location.href= "User=" &location.href
</script>
<%
Else
User=replace (user, "http://", "")
Auser=instr (User, "@")
If Auser>0 Then
User=left (USER,AUSER-1)
End If
Mdbname= "Dns.mdb" ' Dns.mdb for data inventory name
Set Conn=server.createobject ("Adodb.connection")
Conn.Open "dbq=" &server.mappath (mdbname) & ";d River={microsoft Access Driver (*.mdb)};"
Set Rs=server.createobject ("Adodb.recordset")
Rs.Open "SELECT * from Userdns where user= '" &user& "", conn,1,1
If not rs.eof then
Tourl=rs ("Tourl")
Else
Tourl= "index.asp" changed to the default document name
End If
Rs.close
Set rs=nothing
Conn.close
Set conn=nothing
Response.Redirect Tourl
End If
%>
------------------------------------------------------------------------------------

IE Address bar input: youname@dns.com can be default.asp through the domain name to youname for the user name dns.com for your site's domain name



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.