Foros del Web » Programando para Internet » ASP Clásico »

Problemas con Whois ASP

Estas en el tema de Problemas con Whois ASP en el foro de ASP Clásico en Foros del Web. Hace unos meses bajé un script de un whois en asp y lo instalé en mi página, pero un día dejó de funcionar... Al tratar ...
  #1 (permalink)  
Antiguo 15/01/2003, 19:44
 
Fecha de Ingreso: enero-2003
Mensajes: 6
Antigüedad: 21 años, 4 meses
Puntos: 0
Problemas con Whois ASP

Hace unos meses bajé un script de un whois en asp y lo instalé en mi página, pero un día dejó de funcionar... Al tratar de realizar cualquier búsqueda todas las páginas asp se cuelgan. He leído que es posible que tenga que ver con que la conexión no se está cerrando correctamente, pero esto es un script que yo bajé y que además funcionaba bien al principio. Además revisé el código y la conexión sí se está cerrando. Luego bajé otro script distinto y sigo teniendo el mismo problema. Los dos hacen la búsqueda en internic.net.
Para probar si el problema era mi servidor subí las páginas a otro servidor gratuito que soporta asp (brinkster) pero el error sigue...
Ya no sé qué hacer...
¿Alguien sabe qué puede estar pasando o me puede recomendar otro script para seguir probando?
Gracias
  #2 (permalink)  
Antiguo 16/01/2003, 03:27
Avatar de Laika  
Fecha de Ingreso: octubre-2001
Mensajes: 1.376
Antigüedad: 22 años, 7 meses
Puntos: 0
Postea tu código haber si se ve algun error, sin eso imposible saber que falla

saludoss
  #3 (permalink)  
Antiguo 16/01/2003, 09:20
 
Fecha de Ingreso: enero-2003
Mensajes: 6
Antigüedad: 21 años, 4 meses
Puntos: 0
<!-- #include file=whoisinc.asp -->
<HTML>
<HEAD>
<title>Check Domain</title>
</HEAD>
<BODY>
<h1>Check Domain</h1>
<form name="check domain" method="post" action="checkdomain.asp">
Check Domain: www.
<input type="text" name="domain" value="<%=request("domain")%>">
.
<select name="root">
<%
if request("domain")<>"" then
%>
<option><%=Request("root")%></option>
<%
end if
%>
<option>co.uk</option>
<option>org.uk</option>
<option>net.uk</option>
<option>ltd.uk</option>
<option>plc.uk</option>
<option>sch.uk</option>
<option>me.uk</option>
<option>com</option>
<option>net</option>
<option>org</option>
<option>biz</option>
<option>info</option>
<option>edu</option>
<option>museum</option>
</select>
<input type="submit" name="Submit" value="Check Domain"><br>
Display Whois Output<input type="checkbox" name="output" value="true"<%if Request("output") <> "" then Response.Write " Checked" end if %>>
</form>
<%
If Request("domain") <> "" then
set objWhois = New Whois
objWhois.domain = Request("domain")
objWhois.Root = Request("root")
objWhois.Run
%>
<hr>
<h2>Results for "www.<%=request("domain")%>.<%=request("root") %>"</h2>
<%
if objWhois.available = 1 then
%>
<h3>Domain Avalible</h3>
<%
ElseIf objWhois.available = 2 then
%>
<h3>No Infomation</h3>
<%
ElseIf objWhois.available = 3 then
%>
<h3>Error</h3>
<%
ElseIf objWhois.available = 0 then
%>
<h3>Domain Taken</h3>
<%
else
%>
<h3>Error in class<h3>
<%
end if
%>
<%
if Request("output") <> "" then
Response.Write "<h4>Whois Output:</h4><pre>"
Response.Write objWhois.output
Response.Write "</pre>"
end if
%>
<%
end if
%>
</BODY>
</HTML>
  #4 (permalink)  
Antiguo 16/01/2003, 09:21
 
Fecha de Ingreso: enero-2003
Mensajes: 6
Antigüedad: 21 años, 4 meses
Puntos: 0
Y el archivo whoisinc.asp es este:
Class Whois

Public domain
Public Root
Private strHTML
Private xml
Private strHTMLbits

public Function Run
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
If Right(root,3) = ".uk" then
xml.Open "GET", "http://www.nic.uk/cgi-bin/whois.cgi?query=" & domain & "." & root, False
Else
xml.Open "GET", "http://www.internic.com/cgi/whois?type=domain&whois_nic=" & domain & "." & root, False
End if
xml.Send
strHTML = xml.responseText
If (InStr(strHTML,"<pre>") and InStr(strHTML,"</pre>")) OR (InStr(strHTML,"<PRE>") and InStr(strHTML,"</PRE>")) then
strHTMLbits = Split (strHTML, "<PRE>", -1, 1)
strHTML = strHTMLbits(1)
strHTMLbits = Split (strHTML, "</PRE>", -1, 1)
strHTML = strHTMLbits(0)
Else
strHTML = " Error:<br><br>The Domain you entered may contain invalid characters."
End If
End Function

Public Property Get available
If InStr(strHTML,"No match") or InStr(strHTML,"not found") then
available = 1
Elseif InStr(strHTML,"No information") then
available = 2
Elseif InStr(strHTML,"Error") then
available = 3
Else
available = 0
End If
End Property

Public Property Get output
output = strHTML
End Property

End Class
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:57.