Questions about second-level domain names

Source: Internet
Author: User

::::::: This Program Yangzi Original ::::::::::::::::::
': Passed the test in SQL2000 and 2000s ::::::::
': Contact Me: QQ: 21112856, email: yangzinet@hotmail.com :::::::::
': Http://www.tingfo.net ::::::
To achieve the second-level name effect, the following conditions and procedures are required:
1. There must be a top-level domain name, and the domain name must be well-resolved and pointed.
2. You must have an independent server. A wildcard domain name directs to the server.
3. Create a web site with an empty Host header name in IIS on the server.
4. Set the default page as your second-host Resolution Program (for example, freedns. asp)
5. Second-level domain name series (including application page: shenqing.htm, Add. asp, resolution page ,)
Advantages of this program:
A. You can restrict sensitive words for domain names, such as hacker, wwww, sex, and China.
B. You can restrict the illegal words of the domain name, for example :! · # ¥ % ...... -*()--? '/And so on
C. Each address can only apply for one domain name.
D. restrict the length of the applied domain name,
E. If no one applies for the domain name that the user accesses, go to the specific page, the http://www.51bxg.com/miss.html in this example
F. You have applied for a domain name: *** .yourname.com, which supports both http: // *** .yourname.com and http: // www. *** .youranme.com.
A series of programs Code :
Shenqing.htm
<Form action = adddns. ASP method = post name = FRM onsubmit = "Return check_input ()"> <br> <font color = Red> Add * As required </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 ">
Title:
<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 = "Submit message" style = "border: 1px double RGB (88,88, 88); Font: 9pt">

<Input type = "reset" name = "reset" value = "Rewrite" style = "border: 1px double RGB (88,88, 88); Font: 9pt">
</P>
</Form>
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 "Sorry, you have applied for a second-level domain name. Each user can apply for only one second-level domain name! <Br> the second-level domain name you applied 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, the domain name you applied for: http: //" + nowurl + "has been applied by another company. 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 enter it again"
Response. End
End if
If instr (pbkey, nurl) then
Response. Write "sorry, the domain name you entered contains sensitive words and is not blocked by the Administrator. Please enter it again. "
Response. End
End if
'Determine the validity of a 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, the domain name you entered contains invalid characters. Please enter it again. The following characters are invalid 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, the application is successful. You can use your domain name: http: //" + nowurl immediately
%>
Domain Name desorption program: freedns. asp
<! -- # Include file = "conn. asp" -->
<%
Dim geturl
Geturl = Replace (request. servervariables ("http_host"), "www .","")
Set rs = server. Createobject ("ADODB. recordset ")
SQL = "select * from TB where nowurl = '" & geturl &"'"
Rs. Open SQL, Conn, 1, 1
If Rs. EOF then
Response. Redirect "http://www.51bxg.com/miss.html"
Else
Dim tourl, Company
Tourl = RS ("tourl ")
Company = RS ("company ")
%>
<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Meta content = "text/html; charset = UTF-8" HTTP-EQUIV = "Content-Type">
<Title> <% = company %> </title>
</Head>
<Frameset frameborder = "0" framespacing = "0" scrolling = "no" border = "0" marginheight = "0" marginwidth = "0" rows = "0, *">
<Frame scrolling = "no" noresize = "0" marginwidth = "0" marginheight = "0" framespacing = "0" frameborder = "0" target = "Main" name =" main "src =" about: blank ">
<Frame scrolling = "yes" noresize = "0" marginwidth = "0" marginheight = "0" framespacing = "0" frameborder = "0" target = "Main" name =" main "src =" <% = tourl %> ">
<Noframes>
<Body>
<P> This page uses frames, but your browser doesn't support them. </P> </body>
</Noframes>
</Frameset>
</Html>
<% End if %>

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.