Domain Sorgusu

<% Option Explicit %> 
<%  
  

 

Response.Buffer = False  

Server.ScriptTimeout = 90 

Private Function whoisResult(whoisURL, strMethod, strCheckString) 

      
     Dim objXMLHTTP                
     Dim strWhoisResultString      

      
     Set objXMLHTTP = Server.CreateObject(”Microsoft.XMLHTTP” ) 
      
      

      
        objXMLHTTP.Open strMethod, whoisURL, False 
         
         
        objXMLHTTP.SEnd 
         
         
        strWhoisResultString = objXMLHTTP.ResponseText 
         
         
        If InStr(1,strWhoisResultString,strCheckString,vbTextCompare) Then 
              
              
             whoisResult = “Bo?ta”  
              
       
        ElseIf InStr(1, strWhoisResultString, “Error” , vbTextCompare) Then 
              
              
             whoisResult = “Hata!”  
              
         Else 
              
              whoisResult = “Dolu”  
        End If 
       
         Set objXMLHTTP = Nothing 
         
End Function 
Private Function characterStrip(strTextInput) 

     Dim intLoopCounter        
      
     For intLoopCounter = 0 To 44 
          strTextInput = Replace(strTextInput, Chr(intLoopCounter), “” , 1, -1, 0)  
     Next 
      
     For intLoopCounter = 46 To 47 
          strTextInput = Replace(strTextInput, Chr(intLoopCounter), “” , 1, -1, 0)  
     Next 
      
     For intLoopCounter = 58 To 96 
          strTextInput = Replace(strTextInput, Chr(intLoopCounter), “” , 1, -1, 0)  
     Next 
      
     For intLoopCounter = 123 To 255 
          strTextInput = Replace(strTextInput, Chr(intLoopCounter), “” , 1, -1, 0)  
     Next 
      
     characterStrip = strTextInput 
      
End Function 
Dim strDomainName       

strDomainName = Trim(Request.QueryString(”domain” )) 

  
If strDomainName <> “” Then 
      
       
     strDomainName = LCase(strDomainName) 
      
       
     strDomainName = Replace(strDomainName, “http://” , “” , 1, -1, 1) 
     strDomainName = Replace(strDomainName, “www.” , “” , 1, -1, 1) 
      
       
  
strDomainName = Replace(strDomainName, “.com” , “” , 1, -1, 1) 
strDomainName = Replace(strDomainName, “.net” , “” , 1, -1, 1) 
strDomainName = Replace(strDomainName, “.org” , “” , 1, -1, 1) 

       
     If Left(strDomainName, 1) = “-” Then strDomainName = Mid(strDomainName, 2, Len(strDomainName)) 
     If Right(strDomainName, 1) = “-” Then strDomainName = Mid(strDomainName, 1, Len(strDomainName)-1) 

       
     strDomainName = Replace(strDomainName, “–” , “-” , 1, -1, 1) 
      
  
     strDomainName = characterStrip(strDomainName) 
End If 
%> 
<html> 
<head> 
<title></title> 

  
</head> 
<body bgcolor=”#FFFFFF” text=”#000000″ link=”#0000CC” vlink=”#0000CC” alink=”#FF0000″> 
  
<form strmethod=”get” name=”frmDomainCheck” action=”whois.asp”> 
<table cellpadding=”0″ cellspacing=”0″ width=”300″ border=”0″ align=”center”> 
   
  <tr>  
   <td class=”normal” height=”2″ width=”300″ align=”center”>  
    <input type=”TEXT” name=”domain” maxlength=”35″ size=”20″ value=”<%=strDomainName %>”> 
    <input type=”submit” value=”Ara” name=”submit”> 
   </td> 
  </tr> 
  
</table> 
</form> 
<center>  
<%  
If strDomainName <> “” Then 
       %> 
<table width=”300″ border=”0″ cellspacing=”1″ cellpadding=”3″> 
  <tr bgcolor=”#CCCCCC”>  
   <td align=”left” width=”150″>Domain Ysmi</td> 
   <td width=”150″>Durum</td> 
  </tr> 
</table> 

<table width=”300″ border=”0″ cellspacing=”1″ cellpadding=”3″> 
  <tr bgcolor=”#FFFFF0″>  
   <td align=”left” width=”150″><% Response.Write(strDomainName & “.net” ) %></td> 
<td width=”150″><% Response.Write(whoisResult(”http://www-whois.internic.net/cgi/whois?whois_nic=” &strDomainName&”.net&type=domain” , “GET” , “No match” )) %></td> 
  </tr> 
</table> 
<table width=”300″ border=”0″ cellspacing=”1″ cellpadding=”3″> 
  <tr bgcolor=”#FFFFF0″>  
   <td align=”left” width=”150″><% Response.Write(strDomainName & “.com” ) %></td> 
<td width=”150″><% Response.Write(whoisResult(”http://www-whois.internic.net/cgi/whois?whois_nic=” &strDomainName&”.com&type=domain” , “GET” , “No match” )) %></td> 
  </tr> 
</table> 
<table width=”300″ border=”0″ cellspacing=”1″ cellpadding=”3″> 
  <tr bgcolor=”#FFFFF0″>  
   <td align=”left” width=”150″><% Response.Write(strDomainName & “.org” ) %></td> 
<td width=”150″><% Response.Write(whoisResult(”http://www-whois.internic.net/cgi/whois?whois_nic=” &strDomainName&”.org&type=domain” , “GET” , “No match” )) %></td> 
  </tr> 
</table> 
<br><br> 
<% 
End If 

%> 
  
</body> 
</html>

Yorumlar (2)