function CheckIfEnglish( String )
{
var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-";
var i;
var c;
if(String.charAt( 0 )=='-')
return false;
if( String.charAt( String.length - 1 ) == '-' )
return false;
for( i = 0; i < String.length; i ++ )
{
c = String.charAt( i );
if (Letters.indexOf( c ) < 0)
return false;
}
return true;
}
function submitchecken() {
if (document.checkdomain.domain.value == "") {
alert("请输入您要查询的英文域名。");
document.checkdomain.domain.focus();
return false;
}
if (!CheckIfEnglish(document.checkdomain.domain.value )) {
alert("\t注意:在查询英文域名时应输入英文不能输入中文及非法字符!\n域名由不分大小写的英文字母和数字组成,除了开头和结尾以外,中间也可以含有“-”(即连字符或称减号)最大长度为26个字符;");
document.checkdomain.domain.focus();
return false;
}
Function GetURL(url)
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "GET", url, False, "", ""
.Send
GetURL = .responsebody
End With
Set Retrieval = Nothing
End Function
Domain = Replace(Request.Form("domain"),"www.","") & "." & Request.Form("ext")
ext=replace(request.form("ext"),".","")
if Domain=".com" or Request.Form("domain")="" then
Response.Write ("<script>alert('看看您什么忘记填写了?没有填写域名吧?');javascript:history.back(1)</script>")
response.end
end if
'TakenHTML = GetURL("http://218.30.103.79/cgi-bin/Check.cgi?domain="&request.form("domain")&"&"&ext&"=yes")
TakenHTML = GetURL("http://218.30.103.79/cgi-bin/Whois.cgi?domain="&request.form("domain")&"&"&ext&"=yes&work=whois")
'TakenHTML = GetURL("http://www.china-channel.com/checkdomain.asp?action=whois&domain="&Domain)
d_exsit=1
Function bin2str(binstr)
Dim varlen,clow,ccc,skipflag
skipflag=0
ccc = ""
varlen=LenB(binstr)
For i=1 To varlen
If skipflag=0 Then
clow = MidB(binstr,i,1)
If AscB(clow) > 127 Then
ccc =ccc & Chr(AscW(MidB(binstr,i+1,1) & clow))
skipflag=1
Else
ccc = ccc & Chr(AscB(clow))
End If
Else
skipflag=0
End If
Next
bin2str = ccc
End Function
TakenHTML=bin2str(TakenHTML)
<% end if
end if
Function dowith()
Dim lStrURL
Dim pagebefore
Dim pageafter
Dim tempcontent
Dim pagestart
Dim pageend
dim temps
pageafter = "<PRE>"
pagebefore = "</PRE>"
tempcontent = TakenHTML
if d_exsit<>0 then
pagestart = InStr(1,tempcontent, pageafter,1)
If pagestart = 0 Then
dowith = "<font color=""red"">信息超时!</font>"
d_exsit = 3
Exit Function
Else
pagestart = pagestart + Len(pageafter) + 1
pageend = InStr(pagestart, tempcontent, pagebefore,1)
If pageend = 0 Then
dowith = "<font color=""red"">信息超时!</font>"
d_exsit = 3
Exit Function
Else
pageend = pageend - pagestart '得到内容长度
tempcontent = Mid(tempcontent, pagestart, pageend)
End If
End If
Set pageregexp = New RegExp
pageregexp.Global = True
pageregexp.Pattern = "<[^>]*>"
tempcontent = pageregexp.Replace(tempcontent, "")
Set pageregexp = Nothing
dowith = tempcontent
End If
End Function
%>