有關(guān)二級(jí)域名的問(wèn)題
更新時(shí)間:2006年09月21日 00:00:00 作者:
::::::: 此程序?qū)贀P(yáng)子原創(chuàng) ::::::::::::::::::
'::::::: 在sql2000,2000s中測(cè)試通過(guò)::::::::
'::::::: 聯(lián)系我:QQ:21112856,Email:yangzinet@hotmail.com:::::::::
'::::::: http://www.tingfo.net ::::::
要達(dá)到二級(jí)名的效果,必須一下條件以及流程:
1、必須有一個(gè)頂級(jí)域名,而且此域名必須做好泛解析并做好指向。
2、必須有一臺(tái)獨(dú)立的服務(wù)器。泛解析的域名指向該服務(wù)器。
3、在服務(wù)器上的IIS建一個(gè)空的主機(jī)頭名的web站點(diǎn)。
4、將默認(rèn)的頁(yè)面設(shè)置為你的二機(jī)解析程序(比如:freedns.asp)
5、二級(jí)域名系列程序(包括申請(qǐng)頁(yè):shenqing.htm,添加頁(yè)add.asp,解析頁(yè),)
此程序的優(yōu)點(diǎn):
a,可以限制申請(qǐng)域名的敏感字,比如 hacker,wwww,sex,china等
b, 可以限制申請(qǐng)域名的非法字,比如:!·#¥%……—*()——?‘“/等
c, 每個(gè)地址只能申請(qǐng)一個(gè)域名。
d,限制申請(qǐng)域名的長(zhǎng)度,
e, 如果用戶所訪問(wèn)的域名沒(méi)人申請(qǐng)則轉(zhuǎn)到特定的頁(yè)面,本例中的http://www.51bxg.com/miss.html
f, 申請(qǐng)了域名:***.yourname.com 可以同時(shí)支持:http://***.yourname.com 以及http://www.***.youranme.com 兩個(gè)域名的訪問(wèn)。
一下為系列程序代碼:
shenqing.htm
<form action=adddns.asp method=post name=Frm onSubmit="return check_input()"> <br> <font color=red>加*號(hào)為必填內(nèi)容</font> <br>
您想注冊(cè)的域名:
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>
你實(shí)際的網(wǎng)站地址:
<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=" 提 交 信 息 " style="border:1px double rgb(88,88,88);font:9pt">
<input type="reset" name="Reset" value=" 重 新 填 寫(xiě) " style="border:1px double rgb(88,88,88);font:9pt">
</p>
</form>
添加記錄頁(yè)面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"很抱歉,你已經(jīng)申請(qǐng)過(guò)二級(jí)域名,每個(gè)用戶只能申請(qǐng)一個(gè)二級(jí)域名!<br>你申請(qǐng)的二級(jí)域名是: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"很抱歉,你申請(qǐng)的域名:http://"+nowurl+"已經(jīng)被其他公司申請(qǐng),請(qǐng)另外申請(qǐng)域名。"
response.end
end if
if len(nurl)>along then
response.write"很抱歉,你輸入的域名太長(zhǎng),請(qǐng)重新輸入"
response.end
end if
if instr(pbkey,nurl) then
response.write"很抱歉,你輸入的域名因?yàn)楹忻舾凶侄还芾韱T屏蔽,請(qǐng)重新輸入。"
response.end
end if
'判斷字符的合法性
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"很抱歉,你輸入的域名含有非法字符,請(qǐng)重新輸入,以下字符為非法字符:<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"祝賀,申請(qǐng)成功,你馬上就可使用你的域名:http://"+nowurl
%>
域名解吸程序: 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 %>
'::::::: 在sql2000,2000s中測(cè)試通過(guò)::::::::
'::::::: 聯(lián)系我:QQ:21112856,Email:yangzinet@hotmail.com:::::::::
'::::::: http://www.tingfo.net ::::::
要達(dá)到二級(jí)名的效果,必須一下條件以及流程:
1、必須有一個(gè)頂級(jí)域名,而且此域名必須做好泛解析并做好指向。
2、必須有一臺(tái)獨(dú)立的服務(wù)器。泛解析的域名指向該服務(wù)器。
3、在服務(wù)器上的IIS建一個(gè)空的主機(jī)頭名的web站點(diǎn)。
4、將默認(rèn)的頁(yè)面設(shè)置為你的二機(jī)解析程序(比如:freedns.asp)
5、二級(jí)域名系列程序(包括申請(qǐng)頁(yè):shenqing.htm,添加頁(yè)add.asp,解析頁(yè),)
此程序的優(yōu)點(diǎn):
a,可以限制申請(qǐng)域名的敏感字,比如 hacker,wwww,sex,china等
b, 可以限制申請(qǐng)域名的非法字,比如:!·#¥%……—*()——?‘“/等
c, 每個(gè)地址只能申請(qǐng)一個(gè)域名。
d,限制申請(qǐng)域名的長(zhǎng)度,
e, 如果用戶所訪問(wèn)的域名沒(méi)人申請(qǐng)則轉(zhuǎn)到特定的頁(yè)面,本例中的http://www.51bxg.com/miss.html
f, 申請(qǐng)了域名:***.yourname.com 可以同時(shí)支持:http://***.yourname.com 以及http://www.***.youranme.com 兩個(gè)域名的訪問(wèn)。
一下為系列程序代碼:
shenqing.htm
<form action=adddns.asp method=post name=Frm onSubmit="return check_input()"> <br> <font color=red>加*號(hào)為必填內(nèi)容</font> <br>
您想注冊(cè)的域名:
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>
你實(shí)際的網(wǎng)站地址:
<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=" 提 交 信 息 " style="border:1px double rgb(88,88,88);font:9pt">
<input type="reset" name="Reset" value=" 重 新 填 寫(xiě) " style="border:1px double rgb(88,88,88);font:9pt">
</p>
</form>
添加記錄頁(yè)面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"很抱歉,你已經(jīng)申請(qǐng)過(guò)二級(jí)域名,每個(gè)用戶只能申請(qǐng)一個(gè)二級(jí)域名!<br>你申請(qǐng)的二級(jí)域名是: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"很抱歉,你申請(qǐng)的域名:http://"+nowurl+"已經(jīng)被其他公司申請(qǐng),請(qǐng)另外申請(qǐng)域名。"
response.end
end if
if len(nurl)>along then
response.write"很抱歉,你輸入的域名太長(zhǎng),請(qǐng)重新輸入"
response.end
end if
if instr(pbkey,nurl) then
response.write"很抱歉,你輸入的域名因?yàn)楹忻舾凶侄还芾韱T屏蔽,請(qǐng)重新輸入。"
response.end
end if
'判斷字符的合法性
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"很抱歉,你輸入的域名含有非法字符,請(qǐng)重新輸入,以下字符為非法字符:<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"祝賀,申請(qǐng)成功,你馬上就可使用你的域名:http://"+nowurl
%>
域名解吸程序: 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 %>
相關(guān)文章
驚現(xiàn)索引擎如何索引收錄網(wǎng)頁(yè)的方法
驚現(xiàn)索引擎如何索引收錄網(wǎng)頁(yè)的方法...2007-11-11達(dá)到良好的網(wǎng)站優(yōu)化效果需要注意的十點(diǎn)小結(jié)
要達(dá)到良好的網(wǎng)站優(yōu)化效果,除了要保證足夠的高質(zhì)量原創(chuàng)內(nèi)容及廣泛建立連接提高Link Popularity外,對(duì)網(wǎng)頁(yè)進(jìn)行充分的優(yōu)化更是必需的,本文介紹了網(wǎng)站優(yōu)化效果需要注意的十點(diǎn)小結(jié),感興趣的小伙伴們可以參考一下2007-12-12高手總結(jié)分析如果利用baidu分詞算法分析之二(轉(zhuǎn))
高手總結(jié)分析如果利用baidu分詞算法分析之二(轉(zhuǎn))...2007-11-11- 是不是所有的商業(yè)網(wǎng)站都可以一推百靈?似乎不是。在推廣你的商業(yè)網(wǎng)站之前,你要先檢查網(wǎng)站的“裝備”是否合乎如下要求:網(wǎng)站信息內(nèi)容足夠豐富、準(zhǔn)確、及時(shí)(絕對(duì)不是公司簡(jiǎn)介的電子版);網(wǎng)站設(shè)計(jì)具有專業(yè)水準(zhǔn)(絕對(duì)不是初學(xué)者的涂鴉之作);你已經(jīng)明確網(wǎng)站目標(biāo)市場(chǎng)(如果你的目標(biāo)市場(chǎng)定位在8000萬(wàn)網(wǎng)民,恐怕我們幫不了你)。然后,你就可以參考下面的技巧來(lái)推廣你的網(wǎng)站啦。2008-04-04
AWStats簡(jiǎn)介:Apache/IIS的日志分析工具
AWStats是在Sourceforge上發(fā)展很快的一個(gè)基于Perl的WEB日志分析工具。相對(duì)于另外一個(gè)非常優(yōu)秀的開(kāi)放源代碼的日志分析工具Webalizer,AWStats的優(yōu)勢(shì)在于2008-04-04