• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
    • 軟件測試技術
    • 軟件測試博客
    • 軟件測試視頻
    • 開源軟件測試技術
    • 軟件測試論壇
    • 軟件測試沙龍
    • 軟件測試資料下載
    • 軟件測試雜志
    • 軟件測試人才招聘
      暫時沒有公告

    字號: | 推薦給好友 上一篇 | 下一篇

    二級域名原理以及程序,申請即可開通

    發布: 2007-7-14 19:37 | 作者: 佚名    | 來源: 網絡轉載     | 查看: 12次 | 進入軟件測試論壇討論

    領測軟件測試網 '::::::: 此程序屬揚子原創 ::::::::::::::::::
    '::::::: 在sql2000,2000s中測試通過::::::::
    '::::::: 聯系我:QQ:21112856,Email:yangzinet@hotmail.com:::::::::
    '::::::: http://www.tingfo.net ::::::

    要達到二級名的效果,必須一下條件以及流程:
    1、必須有一個頂級域名,而且此域名必須做好泛解析并做好指向。
    2、必須有一臺獨立的服務器。泛解析的域名指向該服務器。
    3、在服務器上的IIS建一個空的主機頭名的web站點。
    4、將默認的頁面設置為你的二機解析程序(比如:freedns.asp)
    5、二級域名系列程序(包括申請頁:shenqing.htm,添加頁add.asp,解析頁,)


    此程序的優點:
    a,可以限制申請域名的敏感字,比如 hacker,wwww,sex,china等
    b, 可以限制申請域名的非法字,比如:!·#¥%……—*()——?‘“/等
    c, 每個地址只能申請一個域名。
    d,限制申請域名的長度,
    e, 如果用戶所訪問的域名沒人申請則轉到特定的頁面,本例中的http://www.51bxg.com/miss.html
    f, 申請了域名:***.yourname.com 可以同時支持:http://***.yourname.com 以及http://www.***.youranme.com 兩個域名的訪問。


    一下為系列程序代碼:
    shenqing.htm

    <form action=adddns.asp method=post name=Frm onSubmit="return check_input()"> <br> <font color=red>加*號為必填內容</font> <br>
    您想注冊的域名:
    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>
    你實際的網站地址:
    <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=" 重 新 填 寫 " 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"很抱歉,你已經申請過二級域名,每個用戶只能申請一個二級域名!<br>你申請的二級域名是: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"很抱歉,你申請的域名:http://"+nowurl+"已經被其他公司申請,請另外申請域名。"
    response.end
    end if

    if len(nurl)>along then
    response.write"很抱歉,你輸入的域名太長,請重新輸入"
    response.end
    end if

    if instr(pbkey,nurl) then
    response.write"很抱歉,你輸入的域名因為含有敏感字而不管理員屏蔽,請重新輸入。"
    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"很抱歉,你輸入的域名含有非法字符,請重新輸入,以下字符為非法字符:<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"祝賀,申請成功,你馬上就可使用你的域名: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 %>


    延伸閱讀

    文章來源于領測軟件測試網 http://www.kjueaiud.com/


    關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
    版權所有(C) 2003-2010 TestAge(領測軟件測試網)|領測國際科技(北京)有限公司|軟件測試工程師培訓網 All Rights Reserved
    北京市海淀區中關村南大街9號北京理工科技大廈1402室 京ICP備10010545號-5
    技術支持和業務聯系:info@testage.com.cn 電話:010-51297073

    軟件測試 | 領測國際ISTQBISTQB官網TMMiTMMi認證國際軟件測試工程師認證領測軟件測試網

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>