home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 35 / hot35.iso / ficheros / 9INET / WHOIS171.ZIP / ASPSAMP.ZIP / WHOIS.ASP
Text File  |  1998-04-24  |  2KB  |  61 lines

  1. <% 
  2. ' If user entered a Domain Name (second time through this form)
  3. If request.form("DomainName") <> "" then
  4.     
  5.     ' If user clicked on Reset button
  6.     If Request.Form("Action") = "Reset" then
  7.         Session("DomainName") = ""
  8.         Session("Results") = ""    
  9.  
  10.     ' Else if the user clicked on the Submit buttom
  11.     ElseIf Request.Form("Action") = "Submit" then    
  12.  
  13.         ' Store what the user entered
  14.         Session("DomainName") = request.form("DomainName")
  15.  
  16.         ' Setup ASP Error handler
  17.         On Error Resume Next
  18.  
  19.         ' Create the "ACIWhoIs" object
  20.         Set oACI = Server.CreateObject("ACI.WhoIs")        
  21.  
  22.         ' If we were able to create the object
  23.         If IsObject( oACI ) then
  24.  
  25.             ' Setup calling parameters
  26.             HostName = "whois.internic.net"
  27.             Query = request.form("DomainName") & vbLfCr
  28.  
  29.             ' Make the WhoIs call
  30.             Session("Results") = oACI.WhoIs( CStr(HostName), CStr(Query), CInt(30) ) 
  31.  
  32.             If Err.Number > 0 then
  33.                  Session("Results") = "Error: " & Err.Number & " - " & Err.Description
  34.             End If
  35.         Else
  36.              Session("Results") = "Error: " & Err.Number & " - " & Err.Description
  37.         End If
  38.  
  39.         Set oACI = Nothing
  40.     End If
  41. End If
  42. %>
  43. <html>
  44.  
  45. <head>
  46. <title>ACI WhoIs DLL Test Page</title>
  47. </head>
  48.  
  49. <body>
  50.  
  51. <form method="POST" action="whois.asp">
  52.   <p><strong>Enter a domain name:</strong><br>
  53.   <input type="text" name="DomainName" size="32" value="<% = Session("DomainName") %>"><br>
  54.   <input type="submit" value="Submit" name="Action"> <input type="submit" value="Reset"
  55.   name="Action"></p>
  56.   <p><strong>Results:</strong><br>
  57.   <textarea name="Results" rows="18" cols="72"><% = Session("Results") %></textarea></p>
  58. </form>
  59. </body>
  60. </html>
  61.