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

verificador de dominios

Estas en el tema de verificador de dominios en el foro de ASP Clásico en Foros del Web. Hola a todos, tengo una pagina en asp que me verifica si un dominio esta tomado o no. Pero solo se limita a responder OCUPADO ...
  #1 (permalink)  
Antiguo 09/02/2008, 14:45
 
Fecha de Ingreso: enero-2008
Mensajes: 7
Antigüedad: 16 años, 4 meses
Puntos: 0
verificador de dominios

Hola a todos,

tengo una pagina en asp que me verifica si un dominio esta tomado o no. Pero solo se limita a responder OCUPADO o LIBRE; quisiera que cuando el estado sea LIBRE me dirija a otra pagina..es posible eso?

aqui esta algo del codigo:

***********************************

<% Option Explicit %>
<%
Response.Buffer = False
Server.ScriptTimeout = 90
Private Function whoisResult(whoisURL, strMethod, strCheckString)

'Dimension variables
Dim objXMLHTTP 'Holds the XML HTTP Object
Dim strWhoisResultString 'Holds the reult of the whois query

'Create an XML object to query the remote whois server
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")

'Alternative XML HTTP component, for version 3.0 of XMLHTTP
'Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")

'Open a connection to the remote whois server
objXMLHTTP.Open strMethod, whoisURL, False

'Send the request and return the data
objXMLHTTP.Send

'Place the whois registry response into the result string
strWhoisResultString = objXMLHTTP.ResponseText

'If the domain name is to short then tell them it's invalid
If Len(strDomainName) < 3 Then

'Set the return result of the function to not valid
whoisResult = "el nombre de dominio debe contener un minimo de 3 caracteres"

'Check the whois result to see if a result has NOT been found
ElseIf InStr(1, strWhoisResultString, strCheckString, vbTextCompare) Then

'Set the return result of the function to available
whoisResult = "Libre"


'Else if there is an error
ElseIF InStr(1, strWhoisResultString, "Error", vbTextCompare) Then

'Set the return result of the function to Taken
whoisResult = "Error"

'Else there was a result
Else

'Set the return result of the function to Taken
whoisResult = "Ocupado"
End If

'Clean up
Set objXMLHTTP = Nothing

End Function

.
.
.


*****************************


Gracias de antemano!

Miguel
  #2 (permalink)  
Antiguo 09/02/2008, 18:01
Avatar de Shiryu_Libra
Colaborador
 
Fecha de Ingreso: febrero-2007
Ubicación: Cantando "Screenager" en "Kirafa Kaput"
Mensajes: 3.614
Antigüedad: 17 años, 3 meses
Puntos: 88
Re: verificador de dominios

tu mismo te has dado la respuesta, si el XML resultante te da como resultado "ocupado"/"libre" que haga esto o aquello

Cita:
select case whoisresult
case "ocupado" response.redirect "pagina para ocupado"
case "libre" response.redirect "pagina para libre"
end select
solo tienes que manipular el resultado


__________________
"Eres parte del problema, parte de la solucion o parte del paisaje"
Un Saludo desde Desierto de Altar, Sonora, MX.
Shiryu_libra
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 23:31.