Two-level Domain name principles and procedures, application can be opened

Source: Internet
Author: User
Tags contains include sql reset trim domain domain name
Program | Level two domain name | level two domain name ':::::: This procedure is Yangzi original:::,:,::
::::::: In the sql2000,2000s Test through:::::::
The '::::::: Contact me: qq:21112856,email:yangzinet@hotmail.com::::::::
'::::::: Http://www.tingfo.net::::::

To achieve the two-level name effect, you must have the conditions and procedures:
1, must have a top-level domain name, and this domain name must do a pan-resolution and do a good job pointing.
2, must have a stand-alone server. A generic resolved domain name points to the server.
3, on the server, IIS to build a blank host header names of the Web site.
4, the default page set to your two-machine resolution program (for example: freedns.asp)
5, Level two domain name series of procedures (including application page: shenqing.htm, add page add.asp, parse page,)


Advantages of this program:
A, you can limit the application of the domain name sensitive words, such as Hacker,wwww,sex,china, etc.
b, you can limit the application of the domain name of the illegal word, such as:! #¥%......-* ()-? ' "/etc
C, only one domain name can be applied to each address.
D, limit the length of the application domain,
E, if the user visited the domain name no one to apply to go to a specific page, in this case http://www.51bxg.com/miss.html
F, the application of domain name: ***.yourname.com can also support: http://***.yourname.com and http://www.***.youranme.com two domain access.


For a series of program code:
Shenqing.htm

<form action=adddns.asp method=post name=frm onsubmit= "return Check_input ()" > <br> <font color=red> Plus * Must fill in the content </font> <br>
The domain name you want to register:
Http://<input name= "Nowurl" size=12
Style= "border-bottom:1px double; BORDER-LEFT:1PX Double; BORDER-RIGHT:1PX Double; BORDER-TOP:1PX Double; COLOR: #000000; Font-size:9pt "> 51bxg.com
<br>
Your actual website address:
<input name= "Tourl" size=12
Style= "border-bottom:1px double; BORDER-LEFT:1PX Double; BORDER-RIGHT:1PX Double; BORDER-TOP:1PX Double; COLOR: #000000; Font-size:9pt ">
The title you want to display:
<input name= "Company" size=12
Style= "border-bottom:1px double; BORDER-LEFT:1PX Double; BORDER-RIGHT:1PX Double; BORDER-TOP:1PX Double; COLOR: #000000; Font-size:9pt ">


<br>
<input type= "Submit" name= "Submit" value= "Submission Information" style= "border:1px double rgb (88,88,88); font:9pt" >
  
<input type= "reset" name= "reset" value= "re-fill" style= "border:1px double rgb (88,88,88); font:9pt" >
</p>
</form>


Add a record page add.asp
<!--#include file= "Char.inc"-->
<!--#include file= "conn.asp"-->
<%
Uid=request.cookies ("* * *")
%>
<%
Dim Nowurl,tourl,company,along,pbkey
Nowurl=trim (Request.Form ("Nowurl")) + ". 51bxg.com"
Nurl=trim (Request.Form ("Nowurl"))
Tourl=trim (Request.Form ("Tourl"))
Company=trim (Request.Form ("Company"))
Along=20
pbkey= "Www,sex,admin,w,ww,wwww,hacker,hack"


Set Rs=server.createobject ("Adodb.recordset")
Sql= "SELECT * from DNS where userid= '" "&uid&" "
Rs.Open sql,conn,1,1
If not Rs. EOF Then
Response.Write "I am sorry, you have applied for a level two domain name, each user can only apply for a two-level domain name!" <br> The two domain name you apply for is: http://"+rs (" Nowurl ")
Response.End
End If


Set Rs=server.createobject ("Adodb.recordset")
Sql= "SELECT * from DNS where nowurl= '" "&nowurl&" "
Rs.Open sql,conn,1,1
If not rs.eof then
Response.Write "Sorry, you apply for domain name: http://" +nowurl+ "has been applied by other companies, please apply for another domain name. "
Response.End
End If

If Len (nurl) >along Then
Response.Write "Sorry, the domain name you entered is too long, please re-enter"
Response.End
End If

If InStr (Pbkey,nurl) Then
Response.Write "I'm sorry, you entered the domain name because it contains sensitive words without the Administrator screen, please re-enter." "
Response.End
End If

' Judge the legality of character
If InStr (Nurl, "~") or InStr (Nurl, "'") or InStr (Nurl, "/") or InStr (Nurl, "?") or InStr (Nurl, ">") or InStr (Nurl, "<") or InStr (Nurl, ";") or InStr (Nurl, ":") or InStr (Nurl, "}") or InStr (Nurl, "{") or InStr (Nurl, ")") or InStr (Nurl, "(") or InStr (Nurl, "*") or InStr (Nurl, "&") or InStr (Nurl, "^") or InStr (Nurl, "%") or InStr (Nurl, ".") or InStr (Nurl, ",") or InStr (Nurl, "'") or InStr (Nurl, "~") or InStr (Nurl, "!") or InStr (Nurl, "$") Then
Response.Write "Sorry, you entered the domain name contains illegal characters, please re-enter, the following characters are illegal characters: <br>~ '/?" > <; :} {) (* & ^% $ # @! "
Response.End
End If


Set Rs=server.createobject ("Adodb.recordset")
Sql= "SELECT * from * * where Theid is null"
Rs.Open sql,conn,3,3
Rs.addnew
RS ("userid") =uid
RS ("Nowurl") =nowurl
RS ("Tourl") =tourl
RS ("Company") =company
Rs.update
Response.Write "Congratulations, apply successfully, you can immediately use your domain name: http://" +nowurl
%>



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.