Tutorials to .com

Tutorials to .com » Asp » Fso » Principles of secondary domain names, as well as procedures

Principles of secondary domain names, as well as procedures

Print View , by: iSee ,Total views: 7 ,Word Count: 1397 ,Date: Thu, 16 Apr 2009 Time: 4:49 AM

Principles of secondary domain names, as well as procedures for applications to open [the general framework of type II domain]
To achieve the effect of two must be about the conditions and processes:
1, there must be a top-level domain, but this domain must point to the Pan-analysis and do a good job.
2, must have a separate server. Pan-analysis point to the server of the domain name.
3, the IIS on the server host to build a space of the web site first.
4, will be the default page settings for your machine to resolve the two procedures (such as: freedns.asp)
5, two series of domain names (including the application page: shenqing.htm, add a page add.asp, Analysis of page)


The advantages of this procedure:
a, can restrict the application of the sensitive character domain names, such as hacker, wwww, sex, china, etc.
b, may limit the application of the illegal character domain names, such as:! # ¥% ... ... -*()--? ' "/ Etc.
c, each address can only apply for a domain name.
d, limit the length of the application domain,
e, if the user did not visit the domain name to apply to a particular page is, in this case the http://www.51bxg.com/miss.html
f, applied for a domain name can :***. yourname.com support: http:// ***. yourname.com, as well as the two domain names http://www .***. youranme.com visit.


Look for the series of program code:
shenqing.htm

<form action=adddns.asp method=post name=Frm onSubmit="return check_input()"> <br> <font color=red> increase the content of an asterisk must be filled </ font> <br>
You want to register domain names:
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"> .51 bxg.com
<br>
What are the actual site 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">
You are asking to display 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="" style="border:1px double rgb(88,88,88);font:9pt">

<input type="reset" name="Reset" value="" style="border:1px double rgb(88,88,88);font:9pt">
</ p>
</ form>


Add record add.asp page
<!--# 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 already applied for a secondary domain names, each user can only apply for a secondary domain name! <br> you apply the secondary domain name 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, your domain name application: http://" + nowurl + "has been to apply for other companies, please apply for the domain name."
response.end
end if

if len (nurl)> along then
response.write "Sorry, the domain name you have entered is too long, please re-enter"
response.end
end if

if instr (pbkey, nurl) then
response.write "Sorry, the domain name you entered is not because the words contain sensitive shielding administrator, please re-enter."
response.end
end if

'Character to determine the legality of
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 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 to the application is successful, you can now use your domain name: http://" + nowurl
%>


Desorption procedures for domain name: 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 [AutoPage]
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%>


ASP File System Object Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.