Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/02/2008, 14:45
miguelpt
 
Fecha de Ingreso: enero-2008
Mensajes: 7
Antigüedad: 17 años, 3 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